• 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:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Q: Log4J PropertyConfigurator

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I just pick up the log4J last week. So I have not much idea of this thing work. As far as I know is when I want to use a config file to control the logging, I need to call a static method PropertyConfigurator.config(String fileName) after I obtain a Logger instance. However I am quite confuse about that, since in my project there are other resource code (jar file) already using log4J for doing logging and it is using a.property file for doing configuration. And now I need to log my part and using b.property, and the logging part is within a thread. So I am wondering when PropertyConfigurator was being called in two different places and with two different property files, will that mess up the logger configuration. I am confuse of how the PropertyConfigurator works, since I am not passing an instance in to the configurator for doing configuration, and it sounds scary that the Logger may not using the configuration that I specified in my property file. Anyone can explain how PropertyConfigurator work. Thanks.
reply
    Bookmark Topic Watch Topic
  • New Topic