commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff_Mycha...@nlgroup.ca
Subject Re: Totaly frustrated with commons-logging
Date Wed, 11 Dec 2002 15:27:39 GMT

"Commons Logging doesn't need much (none at all) configuration."

I found this as well.
We also use log4j on it own.

 When I tried to *Enable* some Tiles logging, the suggestions from the
tiles docs regarding setting up extra commons-logging config files did not
work.

In the end all I had to do was add the

log4j.logger.org.apache=info
log4j.logger.org.apache.struts.tiles=debug
log4j.logger.org.apache.struts.taglib.tiles=debug

So I am confused as to how commons will just grab our log4j without me telling it.





"Henning P. Schmiedehausen" <hps@intermeta.de>@forge.intermeta.de on
12/11/2002 07:42:21 AM

Please respond to "Jakarta Commons Users List"
       <commons-user@jakarta.apache.org>

Sent by:    henning@forge.intermeta.de


To:    commons-user@jakarta.apache.org
cc:

Subject:    Re: Totaly frustrated with commons-logging


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

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





Mime
View raw message