-
设置包的日志等级
Level level = Level.toLevel(Level.DEBUG);
Logger logger = LogManager.getLogger(“package”);
logger.setLevel(level);
-
设置全局日志等级
Level level = Level.toLevel(Level.DEBUG);
动态设置日志级别
时间: 2024-11-10 13:05:22
Level level = Level.toLevel(Level.DEBUG);
Logger logger = LogManager.getLogger(“package”);
logger.setLevel(level);
Level level = Level.toLevel(Level.DEBUG);
动态设置日志级别