From cc40558976fc6ce87ebdf6261bafe108d914b3d3 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Sat, 18 Mar 2006 13:14:24 +0000 Subject: [PATCH] Weiteren Debuglevel hinzugefuegt: LXDebug::QUERY. Damit koennen dann $querys zur Analyse ausgegeben werden. QUERY steht hinter DEBUG2 als letzter Debuglevel, weil die query Variablen einen erheblichen Ouput erzeugen. --- SL/LXDebug.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 8a9619ca4..00116dd99 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -4,6 +4,7 @@ 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 { -- 2.20.1