main方法设置日志级别
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); List<ch.qos.logback.classic.Logger> loggerList = loggerContext.getLoggerList(); loggerList.forEach(logger -> { logger.setLevel(Level.INFO); });
觉得有帮助可以支持我
LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory(); List<ch.qos.logback.classic.Logger> loggerList = loggerContext.getLoggerList(); loggerList.forEach(logger -> { logger.setLevel(Level.INFO); });