From: Andrew Ruthven Date: Thu, 27 Dec 2007 09:14:47 +0000 (+1300) Subject: When dealing with forking processes it is useful to know the PID that is generating... X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8ae68da4413a77739294436eee6ae7420ee5bba;p=spong.git When dealing with forking processes it is useful to know the PID that is generating the debug messages. --- diff --git a/src/lib/Spong/Log.pm b/src/lib/Spong/Log.pm index e8ef9c8..7f0986c 100755 --- a/src/lib/Spong/Log.pm +++ b/src/lib/Spong/Log.pm @@ -105,7 +105,7 @@ sub error { sub debug { my ($message,$level) = @_; $level = 1 if (! defined $level); # Default to level 1 - print STDERR scalar localtime, " ", $message, "\n" if $debuglevel >= $level; + print STDERR scalar localtime, " - $$ - ", $message, "\n" if $debuglevel >= $level; } 1; # I'm included perl code, I need this line