logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conway Allen" <Allen.Con...@atosorigin.com>
Subject RE: milliseconds
Date Mon, 18 Jul 2005 07:06:53 GMT
Thanks for your reply, Andreas. The problem must be my making - I carried over a pattern that
I have been using with the 0.9.7 which is %d{%d-%b %H:%M:%S,%Q}. Up until now this has worked
- it is even documented in the PatternLayout class description! I see that writing %d{dd-MMM
HH:MM:SS,SSS} gives me what I want. Where is that way of specifying the date+time format documented
please? Have I always been wrong in using the (extended) strtftime format string? [I don't
of course care what format string is required as long as it works].

thanks again!

Allen

> -----Original Message-----
> From: Andreas Fester [mailto:Andreas.Fester@gmx.de]
> Sent: samedi 16 juillet 2005 22:49
> To: Conway Allen
> Cc: Log4CXX User
> Subject: Re: milliseconds
> 
> 
> Hi Allen.
> 
> can you be more specific with your issue? Where do you
> intend to use the %Q format element? At least in the pattern
> layout, millisecond resolution seems to work well: I tried
> something like
> 
> log4j.appender.testAppender.layout.ConversionPattern=%d{HH:mm:ss.SSS} 
> %-5p - %m%n
> 
> The SSS are the milliseconds, and they are printed well:
> 
>   22:45:42.443 DEBUG - Message 0
> 
> Just post one or two lines of code which show your issue :-)
> 
> Best Regards,
> 
> 	Andreas
> 
> Conway Allen wrote:
> > Hello,
> > 
> > It doesn't look as though you can get milliseconds in time 
> strings with 
> > the 0.9.8 on Unix because, as far as I can see, 
> apr_strftime is used and 
> > that is just a front for strftime which of course just works with 
> > seconds. So the documented %Q format element is just treated like 
> > run-of-the-mill characters and not interpreted.
> [...]
> 
> -- 
> Andreas Fester
> mailto:Andreas.Fester@gmx.de
> WWW: http://littletux.homelinux.org
> ICQ: 326674288
> 

Mime
View raw message