log4j日志文件乱码
1、对log4j.properties配置文件:
log4j.appender.A1=org.
apache.log4j.RollingFileAppender
log4j.appender.A1.Encoding=UTF-8
log4j.appender.A1.File=all.log
2、对log4j.xml配置文件:
<appender name="A1" class="org.apache.log4j.RollingFileAppender">
<param name="Encoding" value="UTF-8" />
<param name="File" value="all.log" />
......
</appender>