public static synchronized void assimilate()
    {
        if (assimilated) {
            return;
        }
        assimilated = true;

        // Assimilate java.util.logging
        final Logger rootLogger = LogManager.getLogManager().getLogger("");
        final Handler[] handlers = rootLogger.getHandlers();

        if (handlers != null) {
            for (Handler handler : handlers) {
                rootLogger.removeHandler(handler);
            }
        }

        SLF4JBridgeHandler.install();
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        lc.addListener(new LevelChangePropagator());
        try {
            lc.addListener(new JMXConfigurator(lc,
                    ManagementFactory.getPlatformMBeanServer(),
                    new ObjectName("com.opentable.logging:name=LogbackConfig")));
        } catch (MalformedObjectNameException e) {
            throw new RuntimeException(e);
        }
        LoggerFactory.getLogger(AssimilateForeignLogging.class).info("java.util.logging was assimilated.");
    }
public static synchronized void assimilate ( ) { if ( assimilated ) { return ; } assimilated = true ; final Logger rootLogger = LogManager . getLogManager ( ) . getLogger ( "" ) ; final Handler [ ] handlers = rootLogger . getHandlers ( ) ; if ( handlers != null ) { for ( Handler handler : handlers ) { rootLogger . removeHandler ( handler ) ; } } SLF4JBridgeHandler . install ( ) ; LoggerContext lc = ( LoggerContext ) LoggerFactory . getILoggerFactory ( ) ; lc . addListener ( new LevelChangePropagator ( ) ) ; try { lc . addListener ( new JMXConfigurator ( lc , ManagementFactory . getPlatformMBeanServer ( ) , new ObjectName ( "com.opentable.logging:name=LogbackConfig" ) ) ) ; } catch ( MalformedObjectNameException e ) { throw new RuntimeException ( e ) ; } LoggerFactory . getLogger ( AssimilateForeignLogging . class ) . info ( "java.util.logging was assimilated." ) ; }
Assimilate a small set of logging frameworks.