projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add better new user logging in PC92/PC19
[spider.git]
/
perl
/
DXDebug.pm
diff --git
a/perl/DXDebug.pm
b/perl/DXDebug.pm
index c2e5f28f1adb81a009f087a067e26f1f0b22debb..3ab7c77084693ec3ff41bbfae672a800fba90ddb 100644
(file)
--- a/
perl/DXDebug.pm
+++ b/
perl/DXDebug.pm
@@
-25,10
+25,11
@@
package DXDebug;
use 5.10.1;
package DXDebug;
use 5.10.1;
+use warnings;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose dbgtrace dbgprintring confess croak cluck carp);
+@EXPORT = qw(dbginit dbg dbgadd dbgsub dbglist dbgdump isdbg dbgclose dbgtrace dbgprintring
dbgsetcat
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);
@@
-69,12
+70,12
@@
if (!defined $DB::VERSION) {
exit(-1);
}
sub carp {
exit(-1);
}
sub carp {
- DXDebug::dbgprintring(
25) if DXDebu
g('nologchan');
+ DXDebug::dbgprintring(
5) if DXDebug::isdb
g('nologchan');
# DXDebug::dbg(Carp::shortmess(\@_));
DXDebug::longmess(\@_);
}
sub cluck {
# DXDebug::dbg(Carp::shortmess(\@_));
DXDebug::longmess(\@_);
}
sub cluck {
- DXDebug::dbgprintring(
25) if DXDebu
g('nologchan');
+ DXDebug::dbgprintring(
5) if DXDebug::isdb
g('nologchan');
# DXDebug::dbg(Carp::longmess(\@_));
DXDebug::longmess(\@_);
} );
# DXDebug::dbg(Carp::longmess(\@_));
DXDebug::longmess(\@_);
} );
@@
-297,6
+298,12
@@
sub dbgclean
}
}
}
}
+# force a category for the next (unconditional) dbg message (replace (*) with (<something>))
+sub dbgsetcat
+{
+ $_isdbg = shift;
+}
+
1;
__END__
1;
__END__