diff options
author | Peter Palfrader <peter@palfrader.org> | 2003-02-18 06:38:34 +0000 |
---|---|---|
committer | Peter Palfrader <peter@palfrader.org> | 2003-02-18 06:38:34 +0000 |
commit | 4a14e35aa72f11b04fac87d1ebc8cf8f1e2828e1 (patch) | |
tree | 6efaaa4a5a31a08e387bfd658630cd81cc14a4b7 /Echolot/Log.pm | |
parent | 8008d99c22778c8735d4ad24352a61e2d7c17d84 (diff) |
List From: headers
Diffstat (limited to 'Echolot/Log.pm')
-rw-r--r-- | Echolot/Log.pm | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Echolot/Log.pm b/Echolot/Log.pm index 5078835..7e60612 100644 --- a/Echolot/Log.pm +++ b/Echolot/Log.pm @@ -1,7 +1,7 @@ package Echolot::Log; # (c) 2002 Peter Palfrader <peter@palfrader.org> -# $Id: Log.pm,v 1.6 2003/01/14 07:38:27 weasel Exp $ +# $Id: Log.pm,v 1.7 2003/02/18 06:38:09 weasel Exp $ # =pod @@ -42,11 +42,10 @@ sub header_log($$) { $monnames[$mon], $mday, $hour, $min, $sec); - my $logstring = $time.' '. - '['.uc($level).']'. ' '. - $msg; - $logstring =~ s/\n/\n /mg; - $logstring .= "\n"; + my $prefix = $time.' ['.uc($level).'] '; + my $logstring = $msg."\n"; + my $first = 0; + $logstring =~ s/^/ $prefix . ($first++ ? ' ' : '' ) /emg; return $logstring; }; |