You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ashish Kulkarni <as...@gmail.com> on 2009/01/28 21:29:22 UTC
Initialize log4j properties file from database,
HiNormally i load log4j from properties file or XML file,
If i have properties file i initialize using PropertyConfigurator, or if XML
file initialize using DOMConfigurator.
Can i possible load these properties from a database?
Also can i log messages to a database?
Ashish
Re: Initialize log4j properties file from database,
Posted by Curt Arnold <ca...@apache.org>.
On Jan 28, 2009, at 2:29 PM, Ashish Kulkarni wrote:
> HiNormally i load log4j from properties file or XML file,
> If i have properties file i initialize using PropertyConfigurator,
> or if XML
> file initialize using DOMConfigurator.
>
> Can i possible load these properties from a database?
The PropertiesConfiguration can take a java.lang.Properties object, so
if you can get the info from the database into a Properties object,
then the configuration can take it from there. The DOMConfigurator
also can take a org.w3c.dom.Element, so if you populate that from a
database, it can do the same.
>
>
> Also can i log messages to a database?
>
log4j has a JDBCAppender and there are several improved appenders
around.
>
> Ashish
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org