X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/edbbcd58bbc9e042771b68510b3986f826d195d9..04bfdc112567932e056aad505b79b4bf7dc6b4b4:/SL/LXDebug.pm diff --git a/SL/LXDebug.pm b/SL/LXDebug.pm index 36812c529..a5f22df4e 100644 --- a/SL/LXDebug.pm +++ b/SL/LXDebug.pm @@ -119,7 +119,7 @@ sub leave_sub { my ($dummy1, $self_filename, $self_line) = caller(0); my $indent = " " x --$self->{"calldepth"}; - my $time = $self->want_request_timer ? $self->get_request_time : ''; + my $time = $self->want_request_timer ? $self->get_request_time || '' : ''; if (!defined($package)) { $self->_write('sub' . $level, $indent . "/ $time top-level?\n"); @@ -262,7 +262,7 @@ sub _write { chomp($message); if ((FILE_TARGET == $self->{"target"}) - && open(FILE, ">>" . $self->{"file"})) { + && open(FILE, ">>", $self->{"file"})) { print(FILE "${date}${message}\n"); close(FILE); @@ -292,9 +292,9 @@ sub end_request { } sub log_time { - my $self = shift; + my ($self, @slurp) = @_; return 1 unless want_request_timer(); - $self->_write("time", $self->get_request_time); + $self->_write("time", $self->get_request_time() . (@slurp ? " (@slurp)" : '')); } sub get_request_time { @@ -340,11 +340,11 @@ __END__ =head1 NAME -LXDebug - Lx-Office debugging facilities +LXDebug - kivitendo debugging facilities =head1 SYNOPSIS -This module provides functions for debugging Lx-Office. An instance is +This module provides functions for debugging kivitendo. An instance is always created as the global variable C<$::lxdebug> at the earliest possible moment. @@ -418,7 +418,7 @@ Shortcut for C. =head1 CONFIGURATION C gets its configuration from the C<[debug]> section of -the C configuration file. The available options +the C configuration file. The available options are: =over 4 @@ -475,7 +475,7 @@ enabling and disabling certain debug levels. =back -Note that these are only useful if Lx-Office is running as a FastCGI +Note that these are only useful if kivitendo is running as a FastCGI application because otherwise the changes would be lost when the process exits in a normal CGI environment.