对于log4j.properties配置文件:
class="java">log4j.appender.A1=org.apache.log4j.RollingFileAppender log4j.appender.A1.Encoding=UTF-8 log4j.appender.A1.File=all.log
?对于log4j.xml配置文件:
?
<appender name="A1" class="org.apache.log4j.RollingFileAppender"> <param name="Encoding" value="UTF-8" /> <param name="File" value="all.log" /> ...... </appender>
?
(转自:http://blog.csdn.net/inkfish/article/details/4761357)