How do I adjust log4j levels at runtime?

后端 未结 2 1500
你的背包
你的背包 2021-02-19 07:19

I have a simple web app running on Tomcat 5.5 with log4j for logging. Occasionally I need to push the logging down to DEBUG but most of the time I\'m happy with INFO.

I

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-02-19 08:11

    I created a new java application module (jar) to do this in a web interface at runtime, and also have a page to view the log result. Configure the jar is very simple: must be placed in the /WEB-INF/lib folder, and add a mapping to the servlet in the /WEB-INF/web.xml file.

    Project site: http://www.log4jwebtracker.com

提交回复
热议问题