java开启log4j的debug模式
-Dlog4j.debug=true
tomcat启动debug模式:
linux打开catalina.sh导入:
export JAVA_OPTS="$JAVA_OPTS -Dlog4j.debug=true"
启动后打印日志:
og4j: Using URL [file:/tomcat/webapps/api/WEB-INF/classes/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL file:/tomcat/webapps/api/WEB-INF/classes/log4j.properties
log4j: Parsing for [root] with value=[WARN,appendConsole,errorlog,stdout].