Log4J 1.3 will actually provide a servlet (org.apache.log4j.servlet) that let you change the log level dynamically. This servlet is, I think, much more mature than logweb.
The good news is that is it compatible with the current 1.2.14 Log4J, so you just have to find the classes you need in Log4J 1.3, package them in some way and include them in your project. The even better news is that Fabrizio Giustina and his friends (see http://sourceforge.net/projects/openutils/ ) have already bundled all that for you into a nice package called openutils. If you're using maven, getting it inside your project is as simple as that: <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-log4j</artifactId> <version>1.0</version> </dependency> add then some mapping to you Web app: <servlet> <servlet-name>log4j</servlet-name> <servlet-class>it.openutils.log4j.Log4jConfigurationServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>log4j</servlet-name> <url-pattern>/log4j/*</url-pattern> </servlet-mapping> And you're done :-) Have fun, Gaspode On 3/9/07, James Stauffer <[EMAIL PROTECTED]> wrote:
Look ingo LogWeb. It is a servlet that allows changing the config. On 3/9/07, Cheung, Quinn <[EMAIL PROTECTED]> wrote: > Hi all, > We want to use Chainsaw as a logviewer to debug our system by inspecting log messages while trying different scenarios. We would like to be able to have a way to dynamically enable/disable specific loggers that are being used in the system as well as set specific logging levels for each logger. I know this can be done through the XML files, but it's a large distributed system and we want to do it without having to change all the XML files and re-start the system (ie: we want to do it dynamically). I figure all we need is to add a communication channel for chainsaw to send information to the loggers (via a socket), and then add a mechanism on the chainsaw GUI to set the log levels. Chainsaw would then send the commands to set the logging levels to the loggers. Has anyone done anything like this yet? Does anyone have any other ideas? > > Thanks then. > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- James Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
