@ -125,21 +125,23 @@ public class LogbackLoggingSystem extends Slf4JLoggingSystem {
+ location , ex ) ;
+ location , ex ) ;
}
}
List < Status > statuses = context . getStatusManager ( ) . getCopyOfStatusList ( ) ;
List < Status > statuses = context . getStatusManager ( ) . getCopyOfStatusList ( ) ;
if ( containsError ( statuses ) ) {
StringBuilder errors = new StringBuilder ( ) ;
for ( Status status : statuses ) {
System . err . println ( status ) ;
}
throw new IllegalStateException ( "Logback configuration error detected" ) ;
}
}
private boolean containsError ( List < Status > statuses ) {
for ( Status status : statuses ) {
for ( Status status : statuses ) {
if ( status . getLevel ( ) = = Status . ERROR ) {
if ( status . getLevel ( ) = = Status . ERROR ) {
return true ;
errors . append ( errors . length ( ) > 0 ? "\n" : "" ) ;
errors . append ( status . toString ( ) ) ;
}
}
}
}
return false ;
if ( errors . length ( ) > 0 ) {
throw new IllegalStateException ( "Logback configuration error "
+ "detected: \n" + errors ) ;
}
}
@Override
public void cleanUp ( ) {
super . cleanUp ( ) ;
getLoggerContext ( ) . getStatusManager ( ) . clear ( ) ;
}
}
@Override
@Override