Format the date and time with leading zeroes to be easy on the eyes, and easier to...
authordbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 8 Nov 2007 20:36:16 +0000 (20:36 +0000)
committerdbs <dbs@9efc2488-bf62-4759-914b-345cdb29e865>
Thu, 8 Nov 2007 20:36:16 +0000 (20:36 +0000)
git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1125 9efc2488-bf62-4759-914b-345cdb29e865

src/perlmods/OpenSRF/Utils/Logger.pm

index 7ee1eba..10fa7da 100644 (file)
@@ -261,6 +261,7 @@ sub _write_file {
                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 );
 }