struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Hill" <andrew.david.h...@gridnode.com>
Subject RE: [Q] Struts 1.1 & Commons Logging
Date Mon, 07 Jul 2003 07:19:08 GMT
I have both my commons-logging.properties and log4j.properties in
WEB-INF/classes directory.

As for your other question I dont really know any more about how to do it
than you do but heres what I understand so far for what its worth:

Commons-Logging is just an abstraction wrapper around whichever actual
logger you choose to plugin to do the logging work - in our case log4j. The
configuration in commons-logging.properties specifies little more than which
LogFactory and Log class to use - in other words which log implementation to
use. The actual configuration of that logger is implementation dependant and
for log4j is determined by whats in your log4j.properties file.

Unfortunately I dont really have much of a clue as to how to properly
configure log4j (Ive still got everything using one category and appender at
INFO level!!!). I understand that it involves setting up seperate catagories
for the struts and commons classes (org.apache.xxx) that have a higher log
level than your own classes whose catagory might use something detailed like
DEBUG level (which you would lift to a higher level once in production)...
But as to the proper syntax to set up and use these extra categories Im at a
loss.

You will need to check the log4j documentation for the details.
(Like you I found it a bit hard to follow and so have put it off till
another day! If you come across a good summary of the details do post the
link for us!)

-----Original Message-----
From: Riaan Oberholzer [mailto:riaanoberholzer@yahoo.com]
Sent: Monday, 7 July 2003 14:55
To: struts-user@jakarta.apache.org
Subject: [Q] Struts 1.1 & Commons Logging


I just converted a Struts 1.0.2 application to Struts
1.1. The first thing I noticed was the increased level
of logging. I read a few threads and the commons
documentation, but I cannot seem to disable the
logging, or at least set it to another level.

I read the commons-logging.properties file should be
on the classpath - where in a .war file would that be?
And how does that affect my application's
log4j.properties file?

I cannot put it on the classpath of the application
server, as I deliver the .war file as an end result
that should install as is. Thus, no tampering with the
server's settings and files.

And how should the properties file look like? I assume
one entry such as:
log4j.logger.org.apache=WARN
which will set the logging to WARN level?

I found the documentation on this very inclear and
scattered across projects. Any help would be great, thanks.

__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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


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


Mime
View raw message