• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

configure log4j property file using commons logging

 
Ran Giri
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 21322
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
** I am using property file name different than log4j.properties say xyz.properties.
A simple alternative would be to stop doing that.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic