[logback-user] Localtime(from server) to be printed instead of GMT

Kriti Wadhwa kriti.wadhwa at tcs.com
Tue Jun 11 09:53:37 CEST 2013


Hello,
 
As per my understanding currently using following pattern:
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %class{0} %msg%n</pattern>
</encoder>
Time stamp printed in log files display time in GMT format by default. 
 
Using %date{HH:mm:ss.SSS,Australia/Perth} we can set the timezone to a particular value (In this case Australia/Perth).
 
In my application I need:
Time zone to be picked up from local server (/etc/localtime) where the application is running instead of setting it to a specific value in xml as shown above. How can I do this using logback.xml ?
 
Please suggest.
 
Thanks,
Kriti
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130611/68daa387/attachment.html>


More information about the Logback-user mailing list