@ -130,13 +130,13 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
@Override
@Override
public void beforeInitialize ( ) {
public void beforeInitialize ( ) {
super . beforeInitialize ( ) ;
super . beforeInitialize ( ) ;
get Root LoggerConfig( ) . addFilter ( FILTER ) ;
get LoggerContext( ) . getCon figuration ( ) . addFilter ( FILTER ) ;
}
}
@Override
@Override
public void initialize ( LoggingInitializationContext initializationContext ,
public void initialize ( LoggingInitializationContext initializationContext ,
String configLocation , LogFile logFile ) {
String configLocation , LogFile logFile ) {
get Root LoggerConfig( ) . removeFilter ( FILTER ) ;
get LoggerContext( ) . getCon figuration ( ) . removeFilter ( FILTER ) ;
super . initialize ( initializationContext , configLocation , logFile ) ;
super . initialize ( initializationContext , configLocation , logFile ) ;
}
}
@ -204,10 +204,6 @@ public class Log4J2LoggingSystem extends Slf4JLoggingSystem {
return new ShutdownHandler ( ) ;
return new ShutdownHandler ( ) ;
}
}
private LoggerConfig getRootLoggerConfig ( ) {
return getLoggerContext ( ) . getConfiguration ( ) . getLoggerConfig ( "" ) ;
}
private LoggerConfig getLoggerConfig ( String name ) {
private LoggerConfig getLoggerConfig ( String name ) {
name = ( StringUtils . hasText ( name ) ? name : LogManager . ROOT_LOGGER_NAME ) ;
name = ( StringUtils . hasText ( name ) ? name : LogManager . ROOT_LOGGER_NAME ) ;
return getLoggerContext ( ) . getConfiguration ( ) . getLoggers ( ) . get ( name ) ;
return getLoggerContext ( ) . getConfiguration ( ) . getLoggers ( ) . get ( name ) ;