From e51c502876f0ae620a7f6b570da9b88298ca4e83 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 7 May 2007 07:41:49 +0000 Subject: [PATCH] Ausgabe des Stacktraces beim Watchdog, wenn die Kontrollvariable auf > 1 gesetzt ist. --- SL/Watchdog.pm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/SL/Watchdog.pm b/SL/Watchdog.pm index 3aac6532b..69ec53ce0 100644 --- a/SL/Watchdog.pm +++ b/SL/Watchdog.pm @@ -30,6 +30,15 @@ sub STORE { $main::lxdebug->_write("WATCH", "Value of '$key' changed from '$this->{$key}' to '$value' " . "in ${subroutine} at ${self_filename}:${self_line}"); + if ($watched_variables{$key} > 1) { + my $level = 1; + my ($dummy, $filename, $line); + + while (($dummy, $filename, $line, $subroutine) = caller $level) { + $main::lxdebug->_write("WATCH", " ${subroutine} from ${filename}:${line}"); + $level++; + } + } } $this->{$key} = $value; -- 2.20.1