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);
sub dbg
{
- return unless $fp;
+# return unless $fp;
my $t = time;
for (@_) {
my $r = $_;
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 = '';