[ic] error.log date format

Peter peter at pajamian.dhs.org
Sat Sep 12 12:19:07 UTC 2009


On 09/12/2009 04:25 AM, Salvador Caballé wrote:
> I need to change the error.log date format, now is: 
> 
> [12/September/2009:10:02:00 +0200] but i need to change to:
> 
> [12/Sep/2009:10:02:00 +0200]
> 
> how can I change this?

This is hard-coded into the logtime() function, but you should be able
to override it, try the following in Interchange.cfg (I would recommend
putting this right at the top of interchange.cfg so that it gets loaded
as soon as possible):

GlobalSub <<EOR
sub override_logtime {
        package Vend::Data;
        sub logtime {
		return POSIX::strftime("[%d/%b/%Y:%H:%M:%S $Offset]", localtime());
        }
}
EOR


Peter



More information about the interchange-users mailing list