diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-11-09 13:52:41 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-11-09 13:52:41 +0000 |
| commit | c66187b33b7cbbd88697167a583154372705e119 (patch) | |
| tree | b552b1c46dfbb5dbd10d6f6b765164daf6fddfce /bin | |
| parent | 5a05c75078cd3dc8e6eb0ac9cb5e6548c3c8fe9f (diff) | |
| download | xxv-c66187b33b7cbbd88697167a583154372705e119.tar.gz xxv-c66187b33b7cbbd88697167a583154372705e119.tar.bz2 | |
* LOG: Fix missing dump caller's modul name
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/xxvd | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -287,11 +287,11 @@ sub init { -dbh => $DBH, -paths => $PATHS, ); - debug sprintf("Load modul %s(%s)\n", + debug sprintf("Load modul %s(%s)", $moduleName, (ref $MODULES->{$moduleName}) ? $MODULES->{$moduleName}->{MOD}->{Version} - : 'Problem!'); + : 'failed'); } &after(); @@ -659,11 +659,10 @@ sub init_logging { # This will add a callback for log output $Tools::LOG = sub{ + my $errcode = shift; my $msg = shift; - - my ($errcode, $txt) = $msg =~ /ERR:(\d{3})\s+(.*)/si; - $errcode = 201 if(!$errcode); - chomp($txt); + chomp($msg); + $errcode = 200 if(!$errcode); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); @@ -671,7 +670,7 @@ sub init_logging { $year+1900, $mon+1,$mday, $hour, $min, $sec ); open(LOGGER, ">>", $loggerfile) or return; - print LOGGER sprintf("%d (%d) [%s] %s\n",++$loggercnt, $errcode, $tt, $txt); + print LOGGER sprintf("%d (%d) [%s] %s\n",++$loggercnt, $errcode, $tt, $msg); close LOGGER; }; } |
