Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

configure log4j property file using commons logging

 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Marshal
Posts: 26914
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic