projects
/
dweather.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add WLinkExpVar.pdf
[dweather.git]
/
DWeather
/
lib
/
DWeather
/
Debug.pm
diff --git
a/DWeather/lib/DWeather/Debug.pm
b/DWeather/lib/DWeather/Debug.pm
index bf815202b79d42cd0067f2c84883ea8197eb2140..d67b70221022d02e129858c3622c2d417f9ba5d0 100644
(file)
--- a/
DWeather/lib/DWeather/Debug.pm
+++ b/
DWeather/lib/DWeather/Debug.pm
@@
-10,7
+10,7
@@
# modify it under the same terms as Perl itself.
#
# modify it under the same terms as Perl itself.
#
-package Debug;
+package D
Weather::D
ebug;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
@@
-20,7
+20,7
@@
$VERSION = sprintf( "%d.%02d", q$Revision: 1.1 $ =~ /(\d+)\.(\d+)/ );
use strict;
use vars qw(%dbglevel $fp);
use strict;
use vars qw(%dbglevel $fp);
-use
SMGLog ()
;
+use
DWeather::Logger
;
use Carp qw(cluck);
%dbglevel = ();
use Carp qw(cluck);
%dbglevel = ();
@@
-52,8
+52,6
@@
if (!defined $DB::VERSION) {
);
}
);
}
-dbginit();
-
sub dbg
{
my $t = time;
sub dbg
{
my $t = time;
@@
-63,7
+61,7
@@
sub dbg
chomp $r;
my @l = split /\n/, $r;
for (@l) {
chomp $r;
my @l = split /\n/, $r;
for (@l) {
- s/([\x00-\x
08\x0B-\x
1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
+ s/([\x00-\x1f\x7f-\xff])/uc sprintf("%%%02x",ord($1))/eg;
# print "$_\n" if defined \*STDOUT;
$fp->writeunix($t, "$ts $_");
}
# print "$_\n" if defined \*STDOUT;
$fp->writeunix($t, "$ts $_");
}
@@
-78,7
+76,7
@@
sub dbginit
$SIG{__DIE__} = sub { dbg($@, Carp::longmess(@_)); };
}
$SIG{__DIE__} = sub { dbg($@, Carp::longmess(@_)); };
}
- $fp =
SMGLog->new('debug', 'dat', 'd')
;
+ $fp =
DWeather::Logger->new('debug', 'log', 'd') unless $fp
;
}
sub dbgclose
}
sub dbgclose