projects
/
spider.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
dd902a3
)
Allow stuff on the console with no disk logging
author
Dirk Koopman
<djk@tobit.co.uk>
Sat, 23 May 2020 23:03:21 +0000
(
00:03
+0100)
committer
Dirk Koopman
<djk@tobit.co.uk>
Sat, 23 May 2020 23:03:21 +0000
(
00:03
+0100)
perl/DXDebug.pm
patch
|
blob
|
history
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index c195fe2de01763f0025e655ab615dcd26799fe8e..25d742250a6572037ee6f4589a2cf54a4bd4a53f 100644
(file)
--- a/
perl/DXDebug.pm
+++ b/
perl/DXDebug.pm
@@
-26,7
+26,7
@@
package DXDebug;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck);
+@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose confess croak cluck
carp
);
use strict;
use vars qw(%dbglevel $fp $callback $cleandays $keepdays $dbgringlth);
use strict;
use vars qw(%dbglevel $fp $callback $cleandays $keepdays $dbgringlth);
@@
-87,7
+87,7
@@
my $_isdbg; # current dbg level we are processing
sub dbg
{
sub dbg
{
-
return unless $fp;
+
#
return unless $fp;
my $t = time;
for (@_) {
my $r = $_;
my $t = time;
for (@_) {
my $r = $_;
@@
-103,7
+103,7
@@
sub dbg
shift @dbgring while (@dbgring > $dbgringlth);
push @dbgring, $str;
}
shift @dbgring while (@dbgring > $dbgringlth);
push @dbgring, $str;
}
- $fp->writeunix($t, $str) unless
$dbglevel{"nolog$_isdbg"}
;
+ $fp->writeunix($t, $str) unless
!$fp || $dbglevel{"nolog$_isdbg"}
;
}
}
$_isdbg = '';
}
}
$_isdbg = '';