X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Flogging%2Fbridge%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Flogging%2Fbridge%2Finternal%2FActivator.java;h=7061954e80e199b2a52c49eeace78ad27b9d4518;hp=6bafee0b2cdb053c09401f653dbbd5dcc56d3dbd;hb=eb9e1983a0fce7e4a381eff33e40cae957cddf53;hpb=0cfc417107d5b5b1bafdd7ee1fe8e3ba052d5488 diff --git a/opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/Activator.java b/opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/Activator.java index 6bafee0b2c..7061954e80 100644 --- a/opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/Activator.java +++ b/opendaylight/logging/bridge/src/main/java/org/opendaylight/controller/logging/bridge/internal/Activator.java @@ -56,7 +56,7 @@ public class Activator implements BundleActivator { this.listener.logged(entry); } } - + /* * Install the default exception handler so that the uncaught * exceptions are handled by our customized handler. This new @@ -65,13 +65,13 @@ public class Activator implements BundleActivator { */ Thread.setDefaultUncaughtExceptionHandler(new org.opendaylight. controller.logging.bridge.internal.UncaughtExceptionHandler()); - + /* * Install the Shutdown handler. This will intercept SIGTERM signal and * close the system bundle. This allows for a graceful closing of OSGI * framework. */ - + Runtime.getRuntime().addShutdownHook(new shutdownHandler(context)); } else { this.log.error("Cannot register the LogListener because " @@ -95,13 +95,13 @@ public class Activator implements BundleActivator { this.listener = null; this.log = null; } - + private class shutdownHandler extends Thread { BundleContext bundlecontext; public shutdownHandler(BundleContext ctxt) { this.bundlecontext = ctxt; } - + public void run () { try { this.bundlecontext.getBundle(0).stop(); @@ -109,7 +109,7 @@ public class Activator implements BundleActivator { } catch (BundleException e) { log.debug("Bundle couldn't be stopped"); } - } + } } }