log4j 如何禁用Spring批处理控制台日志记录?

bybem2ql  于 2022-11-06  发布在  Spring
关注(0)|答案(1)|浏览(122)

我正在使用sprig batch with spring Boot (2.5.5)。如何禁用由批处理作业和步骤创建的控制台日志?是否有任何配置属性可以直接禁用此功能

INFO 1 --- [   scheduling-1] o.s.b.c.l.support.SimpleJobOperator : Locating parameters for next instance of job with name=myJob
INFO 1 --- [   scheduling-1] o.s.b.c.l.support.SimpleJobOperator : Attempting to launch job with name=myJob and parameters={run.id=3970, now=2021-10-05T15:30:02.154224900Z}
INFO 1 --- [cTaskExecutor-3] o.s.b.c.l.support.SimpleJobLauncher : Job: [SimpleJob: [name=myJob]] launched with the following parameters: [{run.id=3970, now=2021-10-05T15:30:02.154224900Z}]
c6ubokkw

c6ubokkw1#

您可以通过将日志级别更改为ERRORDEBUG来对此进行管理

org.springframework.batch.level=ERROR

相关问题