@ SuppressWarnings ( "static-method" ) @ Singleton @ Provides public Logger provideRootLogger ( ConfigurationFactory configFactory , Provider < Log4jIntegrationConfig > config ) { final Logger root = Logger . getRootLogger ( ) ; // Reroute JUL SLF4JBridgeHandler . removeHandlersForRootLogger ( ) ; SLF4JBridgeHandler . install ( ) ; final Log4jIntegrationConfig cfg = config . get ( ) ; if ( ! cfg . getUseLog4jConfig ( ) ) { cfg . configureLogger ( root ) ; } return root ; }
Provide the root logger .