useful log4j goodies
Configuration servlet
This is nothing more than a modified version of a configuration servlet that can be found in the log4j sandbox. The servlet allow you to see the configured log4j loggers and change their level at runtime.
You can see the references to this configuration servlet in the log4j wiki, at the Log4j 1.3 Features pages and at the useful code page.
The servlet is available in the sandbox from years, but:
If you are tired to wait for log4j 1.3 to be released for a ready-to-use package and you don't want to copy that java file in every project source folder, now you can use openutils-log4j.
The following enhancements have been added to the original servlet:
- Ability to sort loggers by name or level
- Easy level modification (with a select near each logger)
- Clean xhtml strict output (styled using css)
- configurable partial output (via servlet init parameter) which lets you use this servlet in portal environments or tiles
Configuration
This is a sample web.xml configuration:
<servlet> <servlet-name>log4j</servlet-name> <display-name>Log4j configuration Servlet</display-name> <servlet-class>it.openutils.log4j.Log4jConfigurationServlet</servlet-class> </servlet>
The fragment parameter can be added if you don't want a full xhtml page in output, but only the content of the body tag, so that it can be used in portlets or tiles.
Screenshots
This is how the servlet will look

Project info & quick links
-
Latest release: 2.0.5
License: Apache Software License, Version 2.0 - Download Sourceforge file download area
- Bugs and feature requests OpenmindLAB Jira
- Changelog See what's new in release 2.0.5
- Source code Subversion public url
- Javadocs Documentation for the release 2.0.5
- Maven The dependency snippet for your pom