commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John B. Moore" <...@esonicspider.com>
Subject Turning off commons logging
Date Mon, 02 Jun 2008 00:25:15 GMT
I'm using a number of org.apache.commons libraries in a web project and 
I need to turn off the logging that is occurring within the commons.  I 
must confess that, though I have used Log4j for years, I only use it at 
a very basic level and still rely on a very basic property file. (shown 
at the bottom of this message)

The commons libraries are generating massive amounts of output and I 
need to shut that off.

I keep my log4j.properties file for a given webapp in:

../tomcat/webapps/applicationroot/conf/log4j.properties

My first guess wast that it is seeing my core instance of Log4j and 
using that.. but when I add

log4j.logger.org.apache.commons=ERROR

..it has no effect.. which makes me question that it is seeing my 
configuration file.

Anyone have some hints as to getting the commons logging turned off 
without affecting my application logging.

Thanks..

John..


================ current log4j property file contents ===========

log4j.rootLogger=DEBUG, A1, R1

# A1 is a Console Appender
log4j.appender.A1=org.apache.log4j.ConsoleAppender

# R1 is a Rolling file appender
log4j.appender.R1=org.apache.log4j.RollingFileAppender
log4j.appender.R1.File=application.log
# File Size
log4j.appender.R1.MaxFileSize=100KB
# Keep one backup file
log4j.appender.R1.MaxBackupIndex=2


# Output Patterns
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n

log4j.appender.R1.layout=org.apache.log4j.PatternLayout
log4j.appender.R1.layout.ConversionPattern=%-4r [%t](%F:%L) %-5p - %m%n

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message