use JSON as the ForkCall serialiser
[spider.git] / perl / DXLog.pm
index e8d289b0995079b531eb0ce8ff1431626583db3a..0327a7c7d251913200acc69ee2e015aad9975503 100644 (file)
@@ -206,6 +206,8 @@ sub DESTROY
 # The user is responsible for making sense of this!
 sub Log
 {
+       return unless $log;
+       
        my $t = time;
        $log->writeunix($t, join('^', $t, @_) );
 }
@@ -219,5 +221,6 @@ sub LogDbg
 sub Logclose
 {
        $log->close();
+       undef $log;
 }
 1;