use of org.apache.logging.log4j.core.config.Configuration in project pyramid by cheng-li.
the class IMLLogisticRegressionTest method main.
public static void main(String[] args) throws Exception {
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
loggerConfig.setLevel(Level.DEBUG);
ctx.updateLoggers();
test1();
}
use of org.apache.logging.log4j.core.config.Configuration in project pyramid by cheng-li.
the class LogisticRegressionTest method main.
public static void main(String[] args) throws Exception {
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
loggerConfig.setLevel(Level.DEBUG);
ctx.updateLoggers();
// test3();
test5();
}
use of org.apache.logging.log4j.core.config.Configuration in project pyramid by cheng-li.
the class RegressionSynthesizerTest method main.
public static void main(String[] args) throws Exception {
LoggerContext ctx = (LoggerContext) LogManager.getContext(false);
Configuration config = ctx.getConfiguration();
LoggerConfig loggerConfig = config.getLoggerConfig(LogManager.ROOT_LOGGER_NAME);
loggerConfig.setLevel(Level.DEBUG);
ctx.updateLoggers();
// test1();
}
use of org.apache.logging.log4j.core.config.Configuration in project storm by apache.
the class LogConfigManager method getLoggerLevels.
public Map<String, Level> getLoggerLevels() {
Configuration loggerConfig = ((LoggerContext) LogManager.getContext(false)).getConfiguration();
Map<String, Level> logLevelMap = new HashMap<>();
for (Map.Entry<String, LoggerConfig> entry : loggerConfig.getLoggers().entrySet()) {
logLevelMap.put(entry.getKey(), entry.getValue().getLevel());
}
return logLevelMap;
}
use of org.apache.logging.log4j.core.config.Configuration in project hive by apache.
the class OperationManager method initOperationLogCapture.
private void initOperationLogCapture(String loggingMode) {
// Register another Appender (with the same layout) that talks to us.
Appender ap = LogDivertAppender.createInstance(this, OperationLog.getLoggingLevel(loggingMode));
LoggerContext context = (LoggerContext) LogManager.getContext(false);
Configuration configuration = context.getConfiguration();
LoggerConfig loggerConfig = configuration.getLoggerConfig(LoggerFactory.getLogger(getClass()).getName());
loggerConfig.addAppender(ap, null, null);
context.updateLoggers();
ap.start();
}
Aggregations