使用quartz调度任务,每次启动产生大量debug日志,机器都要被累死了。
试过很多方法都不好使,包括在log4j.properties里配置
quartz源代码,发现它的日志输出用的是slf4j,而不是log4j,所以想到用logback.xml来控制。
把他的log级别改成 ERROR。
<root level="ERROR"> <appender-ref ref="file" /> <appender-ref ref="STDOUT" /> </root>
或者索性
在resources目录(和log4j.propertis同级)添加logback.xml文件,内容:
<?xml version="1.0" encoding="UTF-8"?> <configuration> </configuration>
参考自https://blog.csdn.net/shoulder_csdn/article/details/79011103