X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FLXDebug.pm;h=6da1a72724cf690ccfc1cb10d8b6e45379f9d602;hb=b5157f97d47413e5f33cced1d0de527979ff3d61;hp=f59e610113e597d0e58a404a7febeaf83514833c;hpb=4b17bfa891c1dd495558090ef8f558a51222b7a3;p=kivitendo-erp.git diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index f59e61011..6da1a7272 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -1,13 +1,13 @@ package LXDebug; -use constant NONE => 0; -use constant INFO => 1; -use constant DEBUG1 => 2; -use constant DEBUG2 => 4; -use constant QUERY => 8; -use constant TRACE => 16; -use constant CALL_TRACE_ON_ERROR => 32; -use constant ALL => 63; +use constant NONE => 0; +use constant INFO => 1; +use constant DEBUG1 => 2; +use constant DEBUG2 => 4; +use constant QUERY => 8; +use constant TRACE => 16; +use constant BACKTRACE_ON_ERROR => 32; +use constant ALL => 63; use constant FILE_TARGET => 0; use constant STDERR_TARGET => 1; @@ -100,15 +100,15 @@ sub leave_sub { return 1; } -sub full_error_call_trace { +sub show_backtrace { my ($self) = @_; - return 1 unless ($global_level & CALL_TRACE_ON_ERROR); + return 1 unless ($global_level & BACKTRACE_ON_ERROR); - $self->message(CALL_TRACE_ON_ERROR, "Starting full caller dump:"); + $self->message(BACKTRACE_ON_ERROR, "Starting full caller dump:"); my $level = 0; while (my ($dummy, $filename, $line, $subroutine) = caller $level) { - $self->message(CALL_TRACE_ON_ERROR, "${subroutine} from ${filename}:${line}"); + $self->message(BACKTRACE_ON_ERROR, " ${subroutine} from ${filename}:${line}"); $level++; }