Redirecting Caught and Uncaught Exceptions to OSGI Console and Log File
[controller.git] / opendaylight / logging / bridge / src / main / java / org / opendaylight / controller / logging / bridge / internal / UncaughtExceptionHandler.java
1 package org.opendaylight.controller.logging.bridge.internal;
2
3 import org.slf4j.Logger;
4 import org.slf4j.LoggerFactory;
5
6
7 public class UncaughtExceptionHandler implements Thread.UncaughtExceptionHandler{
8         private static Logger log = LoggerFactory.getLogger(UncaughtExceptionHandler.class);
9
10         public void uncaughtException (Thread t, Throwable e) {
11                 log.error("Uncaught ExceptionHandler:", e);
12         }
13 }