Set JCS log level to ERROR - log4j

I applied JCSJ2ee in my application which uses log4j for logging.

My requirements

Install the application rootLoggerat a level DEBUGand JCSlog in ERROR.

What is used

Tried the following in log4jproperties

log4j.category.org.apache.common.jcs=ERROR
log4j.logger.org.apache.common.jcs=ERROR

But nothing affects logging.

Whenever access to the cache occurs, it logs a bunch of messages returning first node.

Note. I am using the latest version of JCScommons-jcs-core-2.0-beta-1.jar

These are my complete log4j.properties

log4j.rootLogger=DEBUG, A1

# Use Console Appender for development
 log4j.appender.A1=org.apache.log4j.ConsoleAppender

log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern= %d [%t] %-5p - %m%n

log4j.logger.net.sf.jasperreports=ERROR
log4j.category.org.apache.common.jcs=ERROR
+4
source share
2 answers

I missed the "s" in the commons . The problem is fixed.

Decision

JCS log4j.

log4j.category.org.apache.commons.jcs=ERROR
log4j.logger.org.apache.commons.jcs=ERROR
+2

JCS , log4j. , log4j , Commons-logging log4j. commons-logging.properties .

org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4jLogger
+1

All Articles