diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-08-02 16:59:16 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-08-02 16:59:16 +0000 |
commit | 097b79a7ab9a1004aff72478bf28706cd4d0d1da (patch) | |
tree | 71091bfcfe942be3eec70d72f60de579a3e3c03a | |
parent | 9f7389afcef27584e94bb586f1d318486945c44d (diff) | |
download | drakx-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar drakx-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.gz drakx-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.bz2 drakx-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.xz drakx-097b79a7ab9a1004aff72478bf28706cd4d0d1da.zip |
(logcolorize) use standard argument passing (needed for next commit)
-rwxr-xr-x | perl-install/standalone/logdrake | 7 |
1 files changed, 3 insertions, 4 deletions
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 |