Hi,
I'm using jboss4.0.3SP1 right now, I was wondering how to get my
errors/exceptions mailed to my email. I tried configuring the conf/log4j.xml
file with the following setting:
<!-- EMail events to an administrator -->
| <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender">
| <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
| <param name="Threshold" value="ERROR"/>
| <param name="To" value="[EMAIL PROTECTED]"/>
| <param name="From" value="[EMAIL PROTECTED]"/>
| <param name="Subject" value="JBoss Sever Errors"/>
| <param name="SMTPHost" value="Success"/>
| <param name="BufferSize" value="10"/>
| <layout class="org.apache.log4j.PatternLayout">
| <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/>
| </layout>
| </appender>
I then use a Logger (org.jboss.Logging.logger) to catch an exception like this
in my code:
private Logger m_oLog = Logger.getLogger("NameOfBean");
| and in the code itself:
| catch(EntityNotFoundException e)
| {
| m_oLog.error("Cound not find PurchaseId: " + strPurchaseId);
| }
What else am I missing?
Thanks!
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3935250#3935250
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3935250
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user