How do I configure log4j properties? In my application, I'm getting the following message:
log4j: WARN No appenders could be found for logger (org.docx4j.jaxb.Context).
log4j: WARN Please initialize the log4j system properly.
log4j: WARN See link for more info.
Looking for the internet, I found the following suggestion:
However, how do I change the property below to false?
org.apache.catalina.loader.WebappClassLoader.ENABLE_CLEAR_REFERENCES
Below is my configuration file for log4j.properties
:
# Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=DEBUG, A1
# A1 is set to be a ConsoleAppender. log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout. log4j.appender.A1.layout=org.apache.log4j.PatternLayout log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.appender.A1.Target=System.out
# An alternative logging format:
# log4j.appender.stdout.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1} - %m%n
#Prevent internal log4j DEBUG messages from polluting the output. log4j.logger.org.apache.log4j.PropertyConfigurator=INFO log4j.logger.org.apache.log4j.config.PropertySetter=INFO log4j.logger.org.apache.log4j.FileAppender=INFO