Log4j defines the Log Level and log4j Log Level of a class.
After a scheduled task is introduced into the project, when I delete an existing scheduled task
[Org. springframework. scheduling. quartz. localperformancejobstore] ClusterManager: detected 1 failed or restarted instances.
[Org. springframework. scheduling. quartz. localperformancejobstore] ClusterManager: Scanning for instance "***"'s failed in-progress jobs.
Such logs are refresh every second, and are flushed on the console.
After I failed to find a solution, I thought of using log4j to shield this log.
The code for blocking is as follows:
Log4j. rootLogger = INFO, A1, Rlog4j.logger.org. springframework. scheduling. quartz. localperformancejobstore = warn
The console generates INFO-level logs, so you can set the Z log level to warn level.
Log4j in the code. logger. **, the following ** is the class at the level you want to define. If you are not sure about the class, you can refer to the content in [] before the log generation, that is, the log generation class.