logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: how to access and manipulate the log4j configuration programmatically
Date Tue, 15 Dec 2009 04:10:26 GMT
Sure.  You can query appenders from logger objects and manipulate everything 
programatically.  There used to be an application called LogWeb [1] that did this, 
but seems to have fallen off the face of the earth.  The code was licensed under 
Apache2, if I recall correctly, so I would think it would still be available 

In any case, there's a simple ConfigurationServlet [2] in the Log4j sandbox that 
you can try to get started quickly.

[1] http://www.codeczar.com/projects/components/logweb/


On 12/11/2009 8:42 PM, Daniela Wersin wrote:
> Hi all
> is there a way to access and manipulate the log4j configuration programmatically from
Java? For example, I would like to get all ConsoleAppenders and modify their ConversionPattern.
I am aware that I could parse each line in the configuration file, or load the configuration
into a Java Properties object and inspect each Property, but both these approaches are tedious
and I wonder if there's a better way.
> Thanks!
> -- Daniela
> __________________________________________________
> Do You Yahoo!?
> Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails.
> http://mail.yahoo.com

To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message