All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brooklyn.util.logging.LoggingSetup Maven / Gradle / Ivy

Go to download

Utility classes and methods developed for Brooklyn but not dependendent on Brooklyn or much else

There is a newer version: 0.7.0-M1
Show newest version
package brooklyn.util.logging;

import org.slf4j.bridge.SLF4JBridgeHandler;

public class LoggingSetup {

    /** bridge java.util.logging messages to slf4j
     * 

* without this, we get ugly java.util.logging messages on the console and _not_ in the file; * with this, the excludes rules (which route the common j.u.l categories to the file _only_) * will apply to j.u.l loggers *

* typically this is invoked in a static block on a class (in tests and in BrooklynWebServer) * or could be done on app startup */ public static void installJavaUtilLoggingBridge() { SLF4JBridgeHandler.removeHandlersForRootLogger(); SLF4JBridgeHandler.install(); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy