[ic] Catalog error.log timestamp format?

Mike Heins mike at perusion.com
Thu Jan 24 01:31:12 UTC 2013


Quoting Peter (peter at pajamian.dhs.org):
> On 24/01/13 05:18, Mike Heins wrote:
> > Quoting IC (ic at tvcables.co.uk):
> >> Hi Folks,
> >>
> >> Where is the catalog error.log timestamp defined, I need to change the
> >> format so it only shows the first 3 letters of the month, eg Jan rather than
> >> January
> > 
> > Right now it isn't configurable, it is set to the HTTP common logtime
> > format. However, you could modify lib/Vend/Util.pm and make the
> > logtime() routine configurable:
> > 
> > # Returns time in HTTP common log format
> > sub logtime {
> >     return POSIX::strftime($::Variable->{MV_LOGTIME_FORMAT} || "[%d/%B/%Y:%H:%M:%S %z]", localtime());
> > }
> > 
> > Then in catalog.cfg:
> > 
> >     Variable MV_LOGTIME_FORMAT [%d/%b/%Y:%H:%M:%S %z]
> 
> Better yet, override the sub from Interchange.cfg, then your custom sub
> won't get overwritten when you upgrade Interchange:
> 
> GlobalSub <<EOR
> sub override_me {
>         package Vend::Util;
>         sub logtime {
>                 return POSIX::strftime($::Variable->{MV_LOGTIME_FORMAT}
> || "[%d/%B/%Y:%H:%M:%S %z]", localtime());
>         }
> }
> EOR

Good point -- glad that technicque still comes to mind. I was planning on
putting in the change, but you know how that goes these days...

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.253.4194  <mike at perusion.com>

There's nothing sweeter than life nor more precious than time.
-- Barney



More information about the interchange-users mailing list