• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

Q: Log4J PropertyConfigurator

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.
I have always wanted to have a neighbor just like you - Fred Rogers. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic