java-如何以编程方式在log4j 2.x中配置输出编码? [英] java - How to configure the output encoding in log4j 2.x programmatically?
本文介绍了java-如何以编程方式在log4j 2.x中配置输出编码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
还有关于以编程方式配置log4j2 的其他问题,但我找不到配置日志输出编码的方法吗?
There are other questions about configuring programmatically log4j2, but I coun't find a way to configure the log output encoding?
推荐答案
我没有以编程方式解决它.我的解决方案是使用以下选项执行Java解释器:
I didn't solve it programatically. My solution was to execute the java interpreter with this option:
java -Dfile.encoding=utf-8
这篇关于java-如何以编程方式在log4j 2.x中配置输出编码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文