Changing the Log Level for applications at runtime
Admin4J allows you to change logger reporting levels at runtime. The advantages are the following:
Putting a logger in DEBUG no longer requires a container recycle.
Many shops put bureacracy in front of container configuration changes in production. This administrative servlet can be safely made available to support developers in all environments.
Supported loggers are the following:
|Logback (release 1.0.4-rc2 and later)|
|Native JDK logging|
Installing Log Level administration tool
Add the following servlet and servlet mapping to your applications web.xml:
<servlet> <servlet-name>LogLevel Servlet</servlet-name> <servlet-class>net.admin4j.ui.servlets.LogLevelServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>LogLevel Servlet</servlet-name> <url-pattern>/admin4j/logLevel</url-pattern> </servlet-mapping>