From 097b79a7ab9a1004aff72478bf28706cd4d0d1da Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 2 Aug 2007 16:59:16 +0000 Subject: (logcolorize) use standard argument passing (needed for next commit) --- perl-install/standalone/logdrake | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'perl-install/standalone/logdrake') diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake index deee52441..59694d7be 100755 --- a/perl-install/standalone/logdrake +++ b/perl-install/standalone/logdrake @@ -302,12 +302,11 @@ sub parse_file { ########################################################################################## sub logcolorize { - local $_ = shift; #my ($data) = @_; - + my ($string) = @_; # we get date & time if it is date & time (dmesg) - s/(\D{3} .. (\d\d:\d\d:\d\d ))//; + $string =~ s/(\D{3} .. (\d\d:\d\d:\d\d ))//; my $timestamp = $isExplain ? $2 : $1; - my @rec = split; + my @rec = split(/\s/, $string); log_output($timestamp, 'Bold', 'darkcyan'); # date & time if any... # BUG: $col hasn't yet be reseted -- cgit v1.2.1