java main方法控制log输出级别

import java.util.List;
import org.slf4j.LoggerFactory;
import ch.qos.logback.classic.Level;
import ch.qos.logback.classic.LoggerContext;

public class TestMainLog{
    public static void main(String[] args) {
        LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
        List<ch.qos.logback.classic.Logger> loggerList = loggerContext.getLoggerList();
        loggerList.forEach(logger -> {
            logger.setLevel(Level.INFO);
        });
    }
}

引用出处:https://www.cnblogs.com/lingyao/p/13614947.html

上一篇:入门:CorelDRAW9中的对象管理(图层)详解


下一篇:执行脚本附加sqlserver数据库.mdf 、.ldf