[opencms-dev] Send opencms exceptions by mail
java at herr-der-mails.de
java at herr-der-mails.de
Fri Jan 19 19:06:57 CET 2007
Hi all,
we're trying to set up logging in OpenCms in such a way that any messages that are logged on ERROR level and any exceptions thrown in OpenCms code are being sent to a tech support account by mail.
The tried approach was to add a new root logger "MAILLOG" in WEB-INF\classes\log4j.properties such as follows:
log4j.rootLogger=\
ERROR,\
OC,\
MAILLOG
...
log4j.appender.MAILLOG=org.apache.log4j.net.SMTPAppender
log4j.appender.MAILLOG.threshold=ERROR
log4j.appender.MAILLOG.From=from at mysite.com
log4j.appender.MAILLOG.To=from at mysite.com
log4j.appender.MAILLOG.Subject=Error in XXX Application
log4j.appender.MAILLOG.SMTPHost=xxx
log4j.appender.MAILLOG.SMTPPassword=xxx
log4j.appender.MAILLOG.SMTPUsername=xxx
log4j.appender.MAILLOG.layout=org.apache.log4j.PatternLayout
log4j.appender.MAILLOG.layout.ConversionPattern=[%d{ABSOLUTE},%c{1}] %m%n
but no luck.
Anybody any idea why ?
Thanks
holger
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
More information about the opencms-dev
mailing list