disable log4j if log4j.properties file is not found.

Posted by zeroin23 on Stack Overflow See other posts from Stack Overflow or by zeroin23
Published on 2010-04-12T03:50:36Z Indexed on 2010/04/12 3:53 UTC
Read the original article Hit count: 209

Filed under:
log4j:WARN No appenders could be found for logger ().<br/>
log4j:WARN Please initialize the log4j system properly.

The above message is shown and i would like to disable the logger if the log4j.properties cannot be found. How do i go about it?

BasicConfigurator.configure(); 

will output to console which is not what i want.

© Stack Overflow or respective owner

Related posts about log4j