X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/ee072e4f077213bf6f8792ca8f0a1afebbb6282f..c7867be75c809e15b7f36f412422ac59a789f060:/SL/LXDebug.pm diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index ac7c577da..00116dd99 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -1,13 +1,13 @@ package LXDebug; -use constant { - NONE => 0, - INFO => 1, - DEBUG1 => 2, - DEBUG2 => 3, +use constant NONE => 0; +use constant INFO => 1; +use constant DEBUG1 => 2; +use constant DEBUG2 => 3; +use constant QUERY => 4; - FILE_TARGET => 0, - STDERR_TARGET => 1 }; +use constant FILE_TARGET => 0; +use constant STDERR_TARGET => 1; use POSIX qw(strftime); @@ -106,10 +106,11 @@ sub message { } if ($log_level >= $level) { - $self->_write(INFO == $level - ? "info" - : DEBUG1 == $level ? "debug1" : "debug2", - $message); + $self->_write(INFO == $level ? "info" + : DEBUG1 == $level ? "debug1" + : DEBUG2 == $level ? "debug2" + : QUERY == $level ? "query":"", + $message ); } } @@ -132,7 +133,7 @@ sub enable_sub_tracing { sub disable_sub_tracing { my ($self) = @_; - $self->{"trace_subs"} = 1; + $self->{"trace_subs"} = 0; } sub _write {