summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-08-02 16:59:16 +0000
committerThierry Vignaud <tv@mandriva.org>2007-08-02 16:59:16 +0000
commit097b79a7ab9a1004aff72478bf28706cd4d0d1da (patch)
tree71091bfcfe942be3eec70d72f60de579a3e3c03a
parent9f7389afcef27584e94bb586f1d318486945c44d (diff)
downloaddrakx-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-xperl-install/standalone/logdrake7
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