commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jonathan Mangano" <>
Subject RE: Totaly frustrated with commons-logging
Date Wed, 11 Dec 2002 14:19:41 GMT
I have been using commons-logging, log4j, Tomcat and Struts for a while now. When configured
it only gives the log messages I want and does not fill my screen or log files with too much
information. Without more information, my guess is that the problem lies with your setup of
log4j, not commons-logging.

Maybe a description of my own setup might help. I have two configuration files in my class

Which contains a single line: 

Which contains the follwing:
# log4j configuration file 


# Create two appenders, one called stdout and the other called rolling, stdout, rolling, stdout, rolling

# Configure the stout appender to go to the Console

# Configure the stdout appender to use the PatternLayout

# Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] (%F:%L) - %m%n

# Configure the rolling appender to be a RollingFileAppender

# Configure the name of the file for the rolling appender

#Configure the layout pattern and conversion pattern for the rolling appender
log4j.appender.rolling.layout.ConversionPattern=%d{ABSOLUTE} - %p %c [%t] - %m%n

I use the standard call to get a logger in my code:
Log logger = LogFactory.getLog(MyClass.class.getName());
logger.warn("This is a warning");

If you are using Struts, you might also want to check that you have the correct jar files.
See and follow the instructions
for log4j users.

-----Original Message-----
From: Zsolt Koppany []
Sent: December 11, 2002 5:20 AM
To: Jakarta Commons Users List
Subject: Totaly frustrated with commons-logging


I'm totally frustrated with commons-logging. My applications uses log4j
and now tomcat switches log4j on because of commons-logging. Because I
do have to debug, I get a lot of absolutely unusable logs. The first log
of my application comes after 18000 lines of logging information.
Somebody might find that very cool I just find it terrible. I have read
the manual of commons-logging. I read about enterprise logging (find it
cool) but could not figure out how for example I could use the jdk-1.4
I really hate that commons-logging changes log4j that I get this huge
amount of unusable debug information.
How can I disable that?

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

Intland GmbH
Schulze-Delitzsch-Str. 16
70565 Stuttgart
Tel: +49-711-7221873 Fax: +49-1212-5168-29527

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message