Revision cc405589
Von Udo Spallek vor fast 19 Jahren hinzugefügt
SL/LXDebug.pm | ||
---|---|---|
4 | 4 |
use constant INFO => 1; |
5 | 5 |
use constant DEBUG1 => 2; |
6 | 6 |
use constant DEBUG2 => 3; |
7 |
use constant QUERY => 4; |
|
7 | 8 |
|
8 | 9 |
use constant FILE_TARGET => 0; |
9 | 10 |
use constant STDERR_TARGET => 1; |
... | ... | |
105 | 106 |
} |
106 | 107 |
|
107 | 108 |
if ($log_level >= $level) { |
108 |
$self->_write(INFO == $level |
|
109 |
? "info" |
|
110 |
: DEBUG1 == $level ? "debug1" : "debug2", |
|
111 |
$message); |
|
109 |
$self->_write(INFO == $level ? "info" |
|
110 |
: DEBUG1 == $level ? "debug1" |
|
111 |
: DEBUG2 == $level ? "debug2" |
|
112 |
: QUERY == $level ? "query":"", |
|
113 |
$message ); |
|
112 | 114 |
} |
113 | 115 |
} |
114 | 116 |
|
... | ... | |
131 | 133 |
|
132 | 134 |
sub disable_sub_tracing { |
133 | 135 |
my ($self) = @_; |
134 |
$self->{"trace_subs"} = 1;
|
|
136 |
$self->{"trace_subs"} = 0;
|
|
135 | 137 |
} |
136 | 138 |
|
137 | 139 |
sub _write { |
Auch abrufbar als: Unified diff
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.