From 8950239d9242d23bed23a7d8357f4d82a404af4d Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 8 Nov 2007 20:36:16 +0000 Subject: [PATCH] Format the date and time with leading zeroes to be easy on the eyes, and easier to parse. git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1125 9efc2488-bf62-4759-914b-345cdb29e865 --- src/perlmods/OpenSRF/Utils/Logger.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/perlmods/OpenSRF/Utils/Logger.pm b/src/perlmods/OpenSRF/Utils/Logger.pm index 7ee1eba..10fa7da 100644 --- a/src/perlmods/OpenSRF/Utils/Logger.pm +++ b/src/perlmods/OpenSRF/Utils/Logger.pm @@ -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 ); } -- 2.11.0