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