Date format
1 posts in topic
Flat View  Flat View

Posted By:   Herve_Leung
Posted On:   Thursday, November 21, 2002 09:36 AM

Is there a way to log the date using the long format (number of millis since 1970) instead of using a clear text
format ?



Re: Date format

Posted By:   Anonymous  
Posted On:   Friday, November 22, 2002 01:14 AM

Sure. The LoggingEvent has a field timeStamp which holds that data. So you can extend the Layout class. Or use DateLayout. The javadoc sais that setDateFormat() takes a string as argument that is forwarded to the constructor of SimpleDateFormat (if it isnĀ“t a predefined value, maybe "ABSOLUTE" will work for you).
About | Sitemap | Contact