Implementation method of log4j configuring log printing time zone

Og4j version: 2.8 one

There is a problem when developing desktop programs. The log time in idea and the running log time of jar package in CMD are normal. After running exe made of exe4j, the log time will be reduced by 8 hours, and the time zone becomes wrong

After looking around the Internet, I found that there was no solution to similar problems. Later, I finally found the corresponding solution in stack overflow

In log4j2 In the XML configuration file, configure as follows

It seems that the lower version log4j doesn't work. It's not verified

The above implementation method of log4j configuring log printing time zone is all the content shared by Xiaobian. I hope it can give you a reference and support more programming tips.

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>