开发者

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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜