You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by johana pin <jo...@yahoo.com> on 2007/08/31 13:26:29 UTC

[s2] 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 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>

How this could be done ? 
Thank you


       
____________________________________________________________________________________
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
http://answers.yahoo.com/dir/?link=list&sid=396545469

Re: [s2] custom ExceptionMappingInterceptor log

Posted by Laurie Harper <la...@holoweb.net>.
johana pin wrote:
> 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 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>
> 
> How this could be done ? 
> Thank you

Sounds like a mis-configuration in log4j.properties, or perhaps a 
mis-use of the logging API. It's hard to tell without more details. What 
do your logging statements look like? What's in log4j.properties?

L.


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