首页  :: 新随笔  :: 管理

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].

智读 | 成都会领科技有限公司官网 | 智读App下载 | 每天听本书的博客 | |