You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4cxx-user@logging.apache.org by jack wu <ja...@yahoo.com> on 2006/06/13 21:49:13 UTC

is millisecond supported?

i can't seem to make millisecond to work with the following pattern string:

%d{%H:%M:%S:%Q}


the rest shows up fine but %Q part shows as "%Q". is it not supported?

i am using the latest code from cvs.

jack.

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: is millisecond supported?

Posted by Curt Arnold <ca...@apache.org>.

On Jun 13, 2006, at 2:49 PM, jack wu wrote:

> i can't seem to make millisecond to work with the following pattern  
> string:
>
> %d{%H:%M:%S:%Q}
>
>
> the rest shows up fine but %Q part shows as "%Q". is it not supported?
>
> i am using the latest code from cvs.
>
> jack.
>

You should use the java.text.SimpleDateFormat syntax (http:// 
java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html  
which does support fractional seconds.  For backward compatibility  
with log4cxx 0.9.7 if a strftime-type format (that is with %'s) is  
detected, then apr_strftime used to format the time.  %Q is not  
implemented in APR's apr_strftime (and is not documented typically in  
systems that do implement it).




Re: is millisecond supported? please help

Posted by Oussama Renuli <Ou...@uv.rub.de>.
hello,

i have to set timestamp format in HTMLLayout in log4j.. currently it 
displays time in milliseconds however i want it in my own format by 
changing configuration in .properties file

this is my log-file:


log4j.rootLogger=DEBUG,A
log4j.appender.A=org.apache.log4j.DailyRollingFileAppender
log4j.appender.A.datePattern='.'yyyy-MM-dd
log4j.appender.A.file=MeineLogDatei.html
log4j.appender.A.layout=org.apache.log4j.HTMLLayout
log4j.appender.A.layout.LocationInfo=false
 
so i want that timeformat in HH:mm und not in ms
 how do i do that ?
 please do reply

my mail is vatlieb@gmail.com.

thank you.

Re: is millisecond supported?

Posted by Matthew Kanwisher <Ma...@kanwisher.com>.
%Q is quarter seconds, but when I compiled the latest apr it didn't seem
like the call it was making supported it anymore at least on win32.

On 6/13/06, jack wu <ja...@yahoo.com> wrote:
>
> i can't seem to make millisecond to work with the following pattern
> string:
>
> %d{%H:%M:%S:%Q}
>
>
> the rest shows up fine but %Q part shows as "%Q". is it not supported?
>
> i am using the latest code from cvs.
>
> jack.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>