summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAndreas Brachold <vdr07@deltab.de>2007-11-09 13:52:41 +0000
committerAndreas Brachold <vdr07@deltab.de>2007-11-09 13:52:41 +0000
commitc66187b33b7cbbd88697167a583154372705e119 (patch)
treeb552b1c46dfbb5dbd10d6f6b765164daf6fddfce /bin
parent5a05c75078cd3dc8e6eb0ac9cb5e6548c3c8fe9f (diff)
downloadxxv-c66187b33b7cbbd88697167a583154372705e119.tar.gz
xxv-c66187b33b7cbbd88697167a583154372705e119.tar.bz2
* LOG: Fix missing dump caller's modul name
Diffstat (limited to 'bin')
-rwxr-xr-xbin/xxvd13
1 files changed, 6 insertions, 7 deletions
diff --git a/bin/xxvd b/bin/xxvd
index 6638854..a4dbc41 100755
--- a/bin/xxvd
+++ b/bin/xxvd
@@ -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;
};
}