logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Moran Ben-David" <mo...@place-base.com>
Subject Apache Commons Collection - CompositeConfiguration
Date Mon, 18 Jul 2005 22:47:52 GMT


I am looking to configure Log4J in my app to use a composite configuration
(one based on multiple files).  Has anyone done this before?  (I searched
the list and didn't find any mention of it.)   Am I correct in wanting to
extend through org.apache.log4j.config to do this?


Does anyone have information on how to use the




package and extend with it?  I'm going through the javadoc but was hoping
that someone else was kind enough to document this process.


Here's more info on what I'm trying to do in case anyone is kind enough to
lend some eyes and braincells:


I want the configuration that log4j will use to be derived from a series of
files and not just from a single file.  Propreties existing in two files,
will be overriden by the higher priority file (i.e. the earlier one in the
list or vice versa).


I'm thinking that the best way to do this is to use the Apache Common
Configuration framework's CompositeConfiguration:


CompositeConfiguration config = new CompositeConfiguration();
config.addConfiguration(new SystemConfiguration());


And then to get Log4J to pickup it's configuration from that "config"
object.  Now comes the task of plugging into log4j.


Any answers to the questions above would be greatly appreciated.



Moran Ben-David



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message