fix: 修改定时任务的log日志
This commit is contained in:
parent
4712d0300a
commit
fdf870c779
@ -1,5 +1,6 @@
|
|||||||
package com.cnbm.scheduletask.task;
|
package com.cnbm.scheduletask.task;
|
||||||
|
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
@ -9,12 +10,12 @@ import org.springframework.stereotype.Component;
|
|||||||
* @Date 2022/6/23 4:41 PM
|
* @Date 2022/6/23 4:41 PM
|
||||||
* @Version 1.0
|
* @Version 1.0
|
||||||
*/
|
*/
|
||||||
|
@Log4j2
|
||||||
@Component("testTask")
|
@Component("testTask")
|
||||||
public class TestTask implements ITask{
|
public class TestTask implements ITask{
|
||||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run(String params){
|
public void run(String params){
|
||||||
logger.debug("TestTask定时任务正在执行,参数为:{}", params);
|
log.info("TestTask定时任务正在执行,参数为:{}", params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user