fix: 修改定时任务的log日志

This commit is contained in:
weihongyang 2022-06-29 16:27:40 +08:00
parent 4712d0300a
commit fdf870c779

View File

@ -1,5 +1,6 @@
package com.cnbm.scheduletask.task;
import lombok.extern.log4j.Log4j2;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
@ -9,12 +10,12 @@ import org.springframework.stereotype.Component;
* @Date 2022/6/23 4:41 PM
* @Version 1.0
*/
@Log4j2
@Component("testTask")
public class TestTask implements ITask{
private Logger logger = LoggerFactory.getLogger(getClass());
@Override
public void run(String params){
logger.debug("TestTask定时任务正在执行参数为{}", params);
log.info("TestTask定时任务正在执行参数为{}", params);
}
}