Revision 09239113
Von Sven Schöling vor etwa 17 Jahren hinzugefügt
SL/DBUtils.pm | ||
---|---|---|
67 | 67 |
sub dump_query { |
68 | 68 |
my ($level, $msg, $query) = splice(@_, 0, 3); |
69 | 69 |
|
70 |
my $filename = $self_filename = 'SL/DBUtils.pm'; |
|
71 |
my $caller_level; |
|
72 |
while ($filename eq $self_filename) { |
|
73 |
(undef, $filename, $line, $subroutine) = caller $caller_level++; |
|
74 |
} |
|
75 |
|
|
70 | 76 |
while ($query =~ /\?/) { |
71 | 77 |
my $value = shift(@_); |
72 | 78 |
$value =~ s/\'/\\\'/g; |
... | ... | |
78 | 84 |
|
79 | 85 |
$msg .= " " if ($msg); |
80 | 86 |
|
81 |
$main::lxdebug->message($level, $msg . $query); |
|
87 |
my $info = "$subroutine called from $filename:$line\n"; |
|
88 |
|
|
89 |
$main::lxdebug->message($level, $info . $msg . $query); |
|
82 | 90 |
} |
83 | 91 |
|
84 | 92 |
sub quote_db_date { |
Auch abrufbar als: Unified diff
Query Aufrufe loggen nun auch woher sie kommen