如有疑问?请联系我
最后更新时间:2023/09/24
欢迎阅读 Open-Starter-Logger 文档!
如果你有任何与 Open-Starter-Logger 相关的问题,欢迎随时在 GitHub Discussions 上向我们的社区寻求帮助。
<dependency>
<groupId>com.saucesubfresh</groupId>
<artifactId>open-starter-logger</artifactId>
<version>1.0.0</version>
</dependency>
com:
saucesubfresh:
logger:
path: /data/server/open-job/logs
public class OpenJobHandlerOne implements OpenJobHandler {
private static final Logger logger = LoggerFactory.getLogger();
@Override
public void handler(JobParam jobParam) throws Exception {
log.info("JobHandlerOne 处理任务");
logger.log("任务正在处理... {}", jobParam.getJobId());
TimeUnit.SECONDS.sleep(3);
logger.log("已处理 3 second... {}", jobParam.getJobId());
TimeUnit.SECONDS.sleep(5);
//throw new RuntimeException("test exception");
logger.log("处理完成 completed... {}", jobParam.getJobId());
}
}
如有疑问?请联系我
最后更新时间:2023/09/24