0

automatically reload its log 4j configuration file upon modification with log4j without restart the weblogic server. is there any configuration similar like logback in log4j is there for above task. wherever we change log4j configuration file from debug to error everytime we need to restart the server. I checked logback which is similar open source like log4j.Other team implement it already is. they dont have to restart the server if is there any changes in log4j file.

Thank you in advance

user1137387
  • 1,933
  • 3
  • 18
  • 27
  • You should habe a look at the [File Watchdog Feature](http://stackoverflow.com/a/4599083/367285). As I never used it myself I will only provide this as a comment - not as an answer. – FrVaBe Mar 19 '12 at 20:08
  • Thanks for the replies with regards configuring Log4J. I've chosen to use a xml config file (after doing some experimenting with properties files).My code uses the DOMConfigurator in the following fashion: DOMConfigurator.configureAndWatch("log4j.xml"); Here's the hiccup, when I make changes to my file, they are not picked-up until I re-start Tomcat. Any ideas ? I've done a little research, and haven't found anything related to bugs on this. Is there something I'm missing ? S – user1137387 Mar 21 '12 at 22:48
  • Did you found how to configure WebLogic in order not to restart it in case if log4j file was changed? – Volodymyr Bezuglyy Apr 18 '13 at 12:57

1 Answers1

0

From what I remember, DOMConfigurator.configureAndWatch is the right way to go, though when I used it it would only pick up changes to the existing properties in the file, and wasn't too happy on the adding and removing of properties and would just ignore these.

dpmatheson
  • 56
  • 5