Hi,
I'm having trouble getting exception logging written to files in Struts
2.2.1. I have enabled the Exception interceptor to log exceptions by adding
the following to the interceptor stack:
<interceptor-ref name="defaultStack">
<param name="exception.logEnabled">true</param>
<param name="exception.logLevel">ERROR</param>
</interceptor-ref>
And have a log4j.properties file configured like this:
log4j.rootLogger=INFO, R, stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d %p - %C{1}.%M(%L) | %m%n
log4j.appender.R=org.apache.log4j.RollingFileAppender
log4j.appender.R.File=${catalina.base}/logs/tomcat.log
log4j.appender.R.MaxFileSize=10MB
log4j.appender.R.MaxBackupIndex=10
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%d %p - %C{1}.%M(%L) | %m%n
But the exception logs are only being printed to the console and not
{catalina.base}/logs/tomcat.log. If I log an error in my java code, it is
indeed logged to the console and file.
Thanks,
--
Eddy Seager