commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: Totaly frustrated with commons-logging
Date Wed, 11 Dec 2002 13:42:21 GMT
Zsolt Koppany <z.koppany@intland.com> writes:

>Unfortunately it is not more possible to configure log4j that I just
>want to see the logs of package xy. I mean a log4j configuration option:

>log4j.rootCategory=DEBUG, A1, A2
>log4j.logger.org.apache.commons=WARN
>log4j.logger.org.apache.struts=WARN
>log4j.logger.xy=DEBUG

of course it is (log4j 1.2.x, x >= 6)

--- cut ---
# Log only WARN and beyond
log4j.rootLogger = WARN, application 

# For Package foo log DEBUG
log4j.category.foo = DEBUG, application
log4j.additivity.foo = false

log4j.appender.application = org.apache.log4j.FileAppender
log4j.appender.application.file = <my log file>
log4j.appender.application.layout = org.apache.log4j.PatternLayout
log4j.appender.application.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.application.append = false
--- cut ---

this will get you WARN messages from all your classes and DEBUG messages
from the foo package.

You might want to read the log4j docs (which suck :-) ). Commons
Logging doesn't need much (none at all) configuration.

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

Mime
View raw message