@Override public LogLevel getLogLevel(String loggerName) { // Get the main logger context. LoggerContext loggerContext = (LoggerContext) LogManager.getContext(false); // Get the main configuration. Configuration configuration = loggerContext.getConfiguration(); // Get the logging configuration for the specified logger name from the main configuration. LoggerConfig loggerConfig = configuration.getLoggerConfig(loggerName); // Return the logging level for the logging configuration. return log4jToGenericLogLevel(loggerConfig.getLevel()); }