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 /perl-install/standalone/logdrake | |
parent | 9f7389afcef27584e94bb586f1d318486945c44d (diff) | |
download | drakx-backup-do-not-use-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar drakx-backup-do-not-use-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.gz drakx-backup-do-not-use-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.bz2 drakx-backup-do-not-use-097b79a7ab9a1004aff72478bf28706cd4d0d1da.tar.xz drakx-backup-do-not-use-097b79a7ab9a1004aff72478bf28706cd4d0d1da.zip |
(logcolorize) use standard argument passing (needed for next commit)
Diffstat (limited to 'perl-install/standalone/logdrake')
-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 |