X-Git-Url: http://dxcluster.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=perl%2FDXLog.pm;h=8e2fc66febaa2021d06fa641bc8771cace0d9708;hb=d99e357e5203c7742b57c51b7c2dd103c1836c01;hp=8cc6f8504b35a842304b2443e1f3d9ac23dc3d23;hpb=49e5783b757e86e6a7949ad00572c8fe6e58f293;p=spider.git diff --git a/perl/DXLog.pm b/perl/DXLog.pm index 8cc6f850..8e2fc66f 100644 --- a/perl/DXLog.pm +++ b/perl/DXLog.pm @@ -27,7 +27,7 @@ package DXLog; require Exporter; @ISA = qw(Exporter); -@EXPORT = qw(Log); +@EXPORT = qw(Log Logclose); use FileHandle; use DXVars; @@ -174,10 +174,8 @@ sub Log $log->writeunix($t, join('^', $t, @_) ); } -sub DESTROY # catch undefs and do what is required further down the tree +sub Logclose { - my $self = shift; - DXDebug::dbg("dxlog", "closing $self->{fn}\n"); - undef $self->{fh} if defined $self->{fh}; -} + $log->close(); +} 1;