struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sunil Krishnatry <sunil.krishna...@gmail.com>
Subject RE: [s2 on J4] custom ExceptionMappingInterceptor log
Date Sun, 02 Sep 2007 17:27:17 GMT
For every class you need to have a logger instance. While creating that
instance you need to pass the class name also to it.
Otherwise I don’t see any problem with the logger.



-----Original Message-----
From: johana pin [mailto:johnpin2050@yahoo.com] 
Sent: Saturday, September 01, 2007 1:24 AM
To: issues@struts.apache.org
Subject: [s2 on J4] custom ExceptionMappingInterceptor log

Hi,
I extended 'ExceptionMappingInterceptor' to add the logging functionality. I
want to log to my own file. The problem is that the logging is done in
SystemOut file. 

I used log4j in the custom interceptor:
private org.apache.commons.logging.Log log = LogFactory.getLog(getClass());
The problem also appears when I use the log object from the super class
(ExceptionMappingInterceptor).

The log4j.properties file works for all the other classes in the
application, but only for this one does not (logging is done in SystemOut).

I did not see any custom parameter related to a log file in struts.xml. The
interceptor usage:
<interceptor-ref name="customExceptionInterceptor">
    <param name="logEnabled">true</param>
    <param name="logLevel">DEBUG</param>
</interceptor-ref>

The application service is WebSphere 6.0. I use the 2.0.9 version of struts
- J4 distribution. I also use Spring.

How this could be done ? 
Thank you


       
____________________________________________________________________________
________
Looking for a deal? Find great prices on flights and hotels with Yahoo!
FareChase.
http://farechase.yahoo.com/

No virus found in this incoming message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date: 8/29/2007
8:21 PM
 

No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.484 / Virus Database: 269.12.12/979 - Release Date: 8/29/2007
8:21 PM
 


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


Mime
View raw message