<div dir="ltr">Hi,<br><br>I previously used log4j with a JMSAppender sending messages to a specific ActiveMq Queue.<br>I managed to configure a FallBackErrorHandlor with a second JMSAppender in case the first JMSAppender was not able to write to the queue.<br>
The ErrorHandler was also configured to send emails when something went wrong.<br><br>I now want to try logback and wonder if there is a way to get errors returned by loggers at runtime.<br>Plesae consider the following situation :<br>
<br>**<br> * Hello world!<br> *<br> */<br>public class App <br>{<br> public static void main( String[] args )<br> {<br> ...<br> ... (some code herer)<br> Logger log = LoggerFactory.getLogger("myLogger");<br>
log.debug("App : main");<br> System.out.println( "Normal end of my process" );<br> }<br>}<br><br>Let's assume the "myLogger" is configured to use a JMSAppender.<br>
I want to know if the log.debug call failed and then not to display "Normal end of my process."<br><br>1. Is this possible ? <br>2. How should I handle errors dealing with logback logger ?<br><br>Thank you<br>Regards,<br>
<br>Jonathan Dray<br><br><br><br></div>