[Opensrf-commits] r1125 - trunk/src/perlmods/OpenSRF/Utils

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Nov 8 15:52:09 EST 2007


Author: dbs
Date: 2007-11-08 15:36:16 -0500 (Thu, 08 Nov 2007)
New Revision: 1125

Modified:
   trunk/src/perlmods/OpenSRF/Utils/Logger.pm
Log:
Format the date and time with leading zeroes to be easy on the eyes, and easier to parse.


Modified: trunk/src/perlmods/OpenSRF/Utils/Logger.pm
===================================================================
--- trunk/src/perlmods/OpenSRF/Utils/Logger.pm	2007-11-06 22:45:19 UTC (rev 1124)
+++ trunk/src/perlmods/OpenSRF/Utils/Logger.pm	2007-11-08 20:36:16 UTC (rev 1125)
@@ -261,6 +261,7 @@
 		or die "Cannot sysopen $logfile: $!";
 	binmode(SINK, ':utf8');
 	print SINK "[$year-$mon-$mday $hour:$min:$sec] $service $msg\n";
+	printf SINK "[%04d-%02d-%02d %02d:%02d:%02d] %s %s\n", $year, $mon, $mday, $hour, $min, $sec, $service, $msg;
 	close( SINK );
 }
 



More information about the opensrf-commits mailing list