private static void loadLoggerConfiguration ( ) { LoggerContext context = ( LoggerContext ) LoggerFactory . getILoggerFactory ( ) ; context . reset ( ) ; JoranConfigurator configurator = new JoranConfigurator ( ) ; configurator . setContext ( context ) ; try { configurator . doConfigure ( LOGBACK_CONF_FILE ) ; } catch ( JoranException je ) { Logger . getLogger ( StrategyExecutionLogging . class . getName ( ) ) . log ( Level . SEVERE , "Unable to load Logback configuration" , je ) ; } }
Loads the Logback configuration from a resource file . Only here to avoid polluting other examples with logs . Could be replaced by a simple logback . xml file in the resource folder .