require Exporter;
@ISA = qw(Exporter);
-@EXPORT = qw(Log Logclose);
+@EXPORT = qw(Log LogDbg Logclose);
use IO::File;
use DXVars;
$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};
}
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} $!";
}
$log->writeunix($t, join('^', $t, @_) );
}
+sub LogDbg
+{
+ DXDebug::dbg($_[$#_]);
+ Log(@_);
+}
+
sub Logclose
{
$log->close();