1、在启动配置项中设置classpath
2、
修改
openfire\build\lib\dist
目录下的
Log4j.xml
文件
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<!-- 添加一个打印控制台的日志 -->
<appender name="STDOUT" class="org.apache.log4j.ConsoleAppender">
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d [%24F:%-4L:%-5p][%x] -%m%n"/>
</layout>
</appender>
<!-- OF-506: Jetty INFO messages are generally not useful. Ignore them by default. -->
<logger name="org.eclipse.jetty">
<level value="warn" />
</logger>
<root>
<!-- level value=debug 指定Log日志级别-->
<level value="debug" />
<!--添加如下内容,表示要使用STDOUT -->
<appender-ref ref="STDOUT" />
<appender-ref ref="debug-out" />
<appender-ref ref="info-out" />
<appender-ref ref="warn-out" />
<appender-ref ref="error-out" />
</root>
</log4j:configuration>