Change Log4j Levels at Runtime Using Openutils-Log4j

Log4j Version 1.3 has a ConfigurationServlet which can be used to view/modify the current log4j logger settings for a web application. Per the information on Log4j website version 1.3 has been abandoned:

log4j 1.3 abandoned
Log4j 1.3 Version Development Has Been Abandoned

Openutils-log4j includes the configuration servlet that provides a simple web interface for changing the log4j levels:

Log4j Control Console
Log4j Control Console

With the configuration below added in web.xml, control console will be accessible using URL pattern /chlog4j (e.g. http://localhost:8080/testwebapp/chlog4j):

  <servlet>
   <display-name>Log4j configuration Servlet</display-name>
   <servlet-name>log4j</servlet-name>
   <servlet-class>it.openutils.log4j.Log4jConfigurationServlet</servlet-class>
 </servlet>

  <servlet-mapping>
  	<servlet-name>log4j</servlet-name>
  	<url-pattern>/chlog4j/*</url-pattern>
  </servlet-mapping>

Dependency to be added in pom.xml:

<dependency>
  <groupId>net.sourceforge.openutils</groupId>
  <artifactId>openutils-log4j</artifactId>
  <version>2.0.3</version>
</dependency>