diff --git a/ym-schedule-task/src/main/java/com/cnbm/scheduletask/task/TestTask.java b/ym-schedule-task/src/main/java/com/cnbm/scheduletask/task/TestTask.java index 0eb2c1b..b14fe2b 100644 --- a/ym-schedule-task/src/main/java/com/cnbm/scheduletask/task/TestTask.java +++ b/ym-schedule-task/src/main/java/com/cnbm/scheduletask/task/TestTask.java @@ -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); } }