ERROR: log4j.appender.DEBUG

1

Hi, I thank you for your help with the following case:

Trying to enable the DEBUG level in rootCategory, like this:

log4j.rootCategory=INFO,CONSOLE,DEBUG

Uploading the tomcat 7 server produces the following error:

log4j:ERROR Could not find value for key log4j.appender.DEBUG

The configuration of the log4j.properties is as follows:

log4j.rootCategory=INFO,CONSOLE


log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d [%t] %X{requestId} %-5p %c %x - %m%n

log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.MaxFileSize=10MB
log4j.appender.file.MaxBackupIndex=10
#log4j.appender.file.file=${log4j}
log4j.appender.file.file=/tmp/mercury.log
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d [%t] %X{requestId} %-5p %c %x - %m%n

log4j.category.com.mercurytfs=ERROR 
log4j.category.com.mercurytfs.mercury.modules.integration=ERROR
log4j.category.org.springframework=ERROR
log4j.category.org.springframework.integration = ERROR
log4j.category.org.springframework.http.converter.json=ERROR
log4j.category.org.springframework.web.client=ERROR
log4j.category.org.springframework.security=ERROR
log4j.category.com.fasterxml.jackson = ERROR
log4j.category.org.hibernate=ERROR
log4j.category.org.hibernate.engine.transaction=ERROR
#log4j.category.org.springframework=ERROR
#log4j.category.org.springframework.data=ERROR
log4j.category.org.dozer=ERROR
log4j.category.org.apache.commons=ERROR
log4j.category.org.apache.commons.beanutils.converters=ERROR
log4j.category.org.aspectj=ERROR
log4j.category.org.jgroups=FATAL
log4j.category.org.quartz=FATAL
log4j.category.com.iterative = ERROR
log4j.category.org.hibernate.SQL=ERROR,a3
log4j.category.org.hibernate.cache=INFO
log4j.category.net.sf.ehcache = INFO
log4j.category.org.springframework.security.ldap=ERROR
log4j.category.org.apache.activemq=INFO


log4j.appender.a3=org.apache.log4j.RollingFileAppender
log4j.appender.a3.MaxFileSize=100MB
log4j.appender.a3.MaxBackupIndex=10
#log4j.appender.file.file=${log4j}
log4j.appender.a3.file=c:/tmp/logs/xxxxx.log
log4j.appender.a3.layout=org.apache.log4j.PatternLayout
log4j.appender.a3.layout.ConversionPattern=%d [%t] %-5p %c %x - %m%n
    
asked by MrDev 07.11.2016 в 17:23
source

1 answer

1

The base level or root for all your loggers can not have two values, you can only have one. You must define that it is INFO or DEBUG or some other value. Your problem is solved like this:

# log4j.rootCategory=INFO,CONSOLE
log4j.rootCategory=DEBUG,CONSOLE
    
answered by 07.11.2016 / 17:36
source