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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-01
  • 2022-01-08
  • 2022-12-23
  • 2021-12-05
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-12-04
  • 2022-12-23
  • 2021-10-03
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案