[logback-user] FallBack Appender and error handler

Jonathan Dray jonathan.dray at gmail.com
Tue Jul 22 17:19:34 CEST 2008


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://qos.ch/pipermail/logback-user/attachments/20080722/5576adb1/attachment.htm 


More information about the Logback-user mailing list