public static LoggingSystem get ( ClassLoader classLoader ) { String loggingSystem = System . getProperty ( SYSTEM_PROPERTY ) ; if ( StringUtils . hasLength ( loggingSystem ) ) { if ( NONE . equals ( loggingSystem ) ) { return new NoOpLoggingSystem ( ) ; } return get ( classLoader , loggingSystem ) ; } return SYSTEMS . entrySet ( ) . stream ( ) . filter ( ( entry ) - > ClassUtils . isPresent ( entry . getKey ( ) , classLoader ) ) . map ( ( entry ) - > get ( classLoader , entry . getValue ( ) ) ) . findFirst ( ) . orElseThrow ( ( ) -> new IllegalStateException ( "No suitable logging system located" ) ) ; }
Detect and return the logging system in use . Supports Logback and Java Logging .