Hey guys,<div><br></div><div>I have a Jetty application that I configured with Logback. I am trying to set it up so any errors that occur during execution are emailed to me. I am a bit of a noobie, and so far I haven't had any luck with this. I can only get exceptions emailed to me if I explicitly set a try/catch block in my code everywhere and call logger.error(...). Is there an easy way to cause all exceptions to be logged and emailed to me via my SMTPAppender?</div>
<div><br></div><div>Here is the config I have attempted to use so far:</div><div><br></div><div><br></div><div><div><configuration debug="true"></div><div> <appender name="EMAIL" class="ch.qos.logback.classic.net.SMTPAppender"></div>
<div> <SMTPHost><a href="http://smtp.gmail.com">smtp.gmail.com</a></SMTPHost></div><div> <SMTPPort>465</SMTPPort></div><div> <SSL>true</SSL></div><div> <Username>myemail</Username></div>
<div> <Password>my password</Password></div><div> <To> myemail</To></div><div> <From> myemail</From></div><div> <Subject>TESTING: %logger{20} - %m</Subject></div>
<div><span class="Apple-tab-span" style="white-space:pre"> </span><layout class="ch.qos.logback.classic.html.HTMLLayout"/></div><div> </appender></div><div><br></div><div> <root level="debug"></div>
<div> <appender-ref ref="EMAIL" /></div><div> </root> </div><div> </div><div> <logger name="exception" level="ERROR"></div><div> <appender-ref ref="EMAIL"></appender-ref></div>
<div> </logger></div><div> </div><div> <logger name="org.mortbay" level="error"></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span><appender-ref name="EMAIL"></div>
<div> </appender-ref></logger></div><div> </div><div> <logger name="developerworks.jetty6" level="error"></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span><appender-ref name="EMAIL"></div>
<div> </appender-ref></logger></div><div> </div><div> <logger name="jupiter.filters" level="error"></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span><appender-ref name="EMAIL"></div>
<div> </appender-ref></logger></div><div> </div><div> <logger name="jupiter.messaging" level="error"></div><div> <span class="Apple-tab-span" style="white-space:pre"> </span><appender-ref name="EMAIL"></div>
<div> </appender-ref></logger></div><div></configuration></div><div><br></div><div>Thanks,</div><div>Brian</div></div>