X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLXDebug.pm;h=00116dd990a7e23c545d54b3ce3063c142304709;hb=a5f55e6fe23ee776e90567d3e5ee6cdf116c3f9c;hp=c3a5a6485cc6faa0f729d9e613452b70087609f1;hpb=5d0421a3b1a61e80f69e181480c73b099cb98ad2;p=kivitendo-erp.git diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index c3a5a6485..00116dd99 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -1,9 +1,10 @@ package LXDebug; -use constant NONE => 0; -use constant INFO => 1; +use constant NONE => 0; +use constant INFO => 1; use constant DEBUG1 => 2; use constant DEBUG2 => 3; +use constant QUERY => 4; use constant FILE_TARGET => 0; use constant STDERR_TARGET => 1; @@ -105,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 ); } } @@ -131,7 +133,7 @@ sub enable_sub_tracing { sub disable_sub_tracing { my ($self) = @_; - $self->{"trace_subs"} = 1; + $self->{"trace_subs"} = 0; } sub _write {