projects
/
spider.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix broken set/sys_qra command
[spider.git]
/
perl
/
DXLog.pm
diff --git
a/perl/DXLog.pm
b/perl/DXLog.pm
index 22f8c808307ce3b4b3fe61f8ce0b6a70a502dd29..bdf441bb56c5ae16735bb896aa035bb5c0fb1091 100644
(file)
--- a/
perl/DXLog.pm
+++ b/
perl/DXLog.pm
@@
-27,7
+27,7
@@
package DXLog;
require Exporter;
@ISA = qw(Exporter);
require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(Log Logclose);
+@EXPORT = qw(Log Log
Dbg Log
close);
use IO::File;
use DXVars;
use IO::File;
use DXVars;
@@
-38,12
+38,6
@@
use Carp;
use strict;
use strict;
-use vars qw($VERSION $BRANCH);
-$VERSION = sprintf( "%d.%03d", q$Revision$ =~ /(\d+)\.(\d+)/ );
-$BRANCH = sprintf( "%d.%03d", q$Revision$ =~ /\d+\.\d+\.(\d+)\.(\d+)/ || (0,0));
-$main::build += $VERSION;
-$main::branch += $BRANCH;
-
use vars qw($log);
$log = new('log', 'dat', 'm');
use vars qw($log);
$log = new('log', 'dat', 'm');
@@
-99,7
+93,7
@@
sub open
$fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable
$self->{fh} = $fh;
$fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable
$self->{fh} = $fh;
-#
DXDebug::dbg("opening $self->{fn}\n") if isdbg("dxlog")
;
+#
print "opening $self->{fn}\n"
;
return $self->{fh};
}
return $self->{fh};
}
@@
-155,7
+149,7
@@
sub write($$$)
if (!$self->{fh} ||
$self->{mode} ne ">>" ||
$jdate->year != $self->{jdate}->year ||
if (!$self->{fh} ||
$self->{mode} ne ">>" ||
$jdate->year != $self->{jdate}->year ||
- $jdate->thing != $self->{jdate}->
year
) {
+ $jdate->thing != $self->{jdate}->
thing
) {
$self->open($jdate, ">>") or confess "can't open $self->{fn} $!";
}
$self->open($jdate, ">>") or confess "can't open $self->{fn} $!";
}
@@
-204,6
+198,12
@@
sub Log
$log->writeunix($t, join('^', $t, @_) );
}
$log->writeunix($t, join('^', $t, @_) );
}
+sub LogDbg
+{
+ DXDebug::dbg($_) for @_;
+ Log(@_);
+}
+
sub Logclose
{
$log->close();
sub Logclose
{
$log->close();