aspose file tools*
The moose likes Other Open Source Projects and the fly likes configure log4j property file using commons logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "configure log4j property file using commons logging" Watch "configure log4j property file using commons logging" New topic
Author

configure log4j property file using commons logging

Ran Giri
Greenhorn

Joined: Oct 09, 2004
Posts: 7
I am wondering is there any way I can load log4j propery file using commons logging API.

My cases:

** We had a logging component which used to initialize the properties file, using init(RESOURCE_BUNDLE) provided by that component. now I am planning to replace that with the commons logging.

** I am using property file name different than log4j.properties say xyz.properties.
** I know that PropertyConfigurator.configure(which is from log4j API) can do the loading but I do not want to use it, as I am not sure the clients of my application will use log4j or not. That is to provide clients the freedom to chose any logging component.

** I wonder if commons logging provides some init method to initialize and load/configure the properties file.

Please let me know - if there are any other alternatives around this???

I appreciate your reply.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18662
    
    8

** I am using property file name different than log4j.properties say xyz.properties.
A simple alternative would be to stop doing that.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: configure log4j property file using commons logging