log4j logger locale problem
I am using Log4j Logger for my application.My application is supporting japanese language also,In japanese locale it is printing log date time in japanese but I want it should print in english only for debuging purpose because I dont know japa开发者_运维技巧nese. plese help me how can I set locale english for logger.
It seems log4j is using default locale, in your case Japanese. What you could try, is editing your log4j.properties/log4j.xml
, make sure you use PatternLayout
in each appender and configure it with ISO8601 date format (locale-independent), for example like so:
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{ISO8601} %m%n"/>
</layout>
精彩评论