Apache Log4j Logging with specific timezone

后端 未结 6 1982
半阙折子戏
半阙折子戏 2021-02-19 07:32

I want the log should contain date entries of specific timezone. Is there any way of forcing timezone in log4j.properties?

Now I am using JDK 1.5, As you al

6条回答
  •  遇见更好的自我
    2021-02-19 07:57

    You can add following line

    log4j.appender.S.layout.ConversionPattern= %d{yyyy-MM-dd HH:mm:ss zzz}{GMT} %-5p [%t][%c:%M(%L)] %m%n
    

提交回复
热议问题