logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hein Meling <mel...@acm.org>
Subject Re: Inheriting configuration
Date Tue, 09 Aug 2005 19:44:51 GMT
Thanks for the suggestion.  However, I would prefer a solution that does
not rely on additional jar files.  My system alread got a home built
configuration framework, and I'm currently not looking to replace it,
albeit it was tempting once I discovered all the nice features of the
Commons Configuration.

Hein

Moran Ben-David wrote:
> Hello Hein,
> 
> I am doing a similar thing that you are looking for.  That is, I am using
> multiple files to create a single configuration for log4j.  The way I do
> this is to 
> 
> 1. create a set of Properties
> 2. use the PropertiesConfigurator to initialize log4j.
> 
> To do step 1, I am using Jakarta's Commons Configuration.  That allows me to
> get a single "Configuration" out of many files.  This module allows you to
> load from many types of sources: JDBC, Xml, .properties file, etc.  You will
> most likely need to use a CompositeConfiguration to decide in runtime that
> you need the extra xml file.
> 
> Hope that helps,
> moran ben-david
> www.place-base.com
> 
> 
>>-----Original Message-----
>>From: Hein Meling [mailto:meling@acm.org]
>>Sent: Tuesday, August 09, 2005 7:25 AM
>>To: Log4J Users List
>>Subject: Inheriting configuration
>>
>>Hi
>>
>>Is it possible to inherit (import) configuration from one log4j-main.xml
>>to another?
>>
>>Say for example, you want to define a common set of appenders, and also
>>some common loggers, but for some subproject you want to define specific
>>loggers only for that subproject's log4j-subproj.xml file.
>>
>>If a particular logger is define in both log4j-*.xml files, I assume the
>>subproject version would override the loggers in log4j-main.xml.
>>
>>Is this possible?  If so, how can I do it?
>>
>>I'm currently using log4j v1.3alpha3.  Eagerly awaiting alpha7 ;-)
>>
>>Thanks,
>>
>>Hein
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 



Mime
View raw message