main方法设置日志级别

LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
List<ch.qos.logback.classic.Logger> loggerList = loggerContext.getLoggerList();
loggerList.forEach(logger -> {
    logger.setLevel(Level.INFO);
});
posted @ 2020-09-04 17:19  灵妖代码  阅读(2094)  评论(0编辑  收藏  举报