mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 23:06:06 +08:00
修改失败任务日志
This commit is contained in:
parent
2ff3869608
commit
9f7bf1f6b8
|
@ -26,8 +26,8 @@ export default class ScheduleService {
|
||||||
exec(command, async (error, stdout, stderr) => {
|
exec(command, async (error, stdout, stderr) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
await this.logger.info(
|
await this.logger.info(
|
||||||
'执行任务`%s`失败,时间:%s, 错误信息:%j',
|
'执行任务%s失败,时间:%s, 错误信息:%j',
|
||||||
name,
|
command,
|
||||||
new Date().toLocaleString(),
|
new Date().toLocaleString(),
|
||||||
error,
|
error,
|
||||||
);
|
);
|
||||||
|
@ -35,8 +35,8 @@ export default class ScheduleService {
|
||||||
|
|
||||||
if (stderr) {
|
if (stderr) {
|
||||||
await this.logger.info(
|
await this.logger.info(
|
||||||
'执行任务`%s`失败,时间:%s, 错误信息:%j',
|
'执行任务%s失败,时间:%s, 错误信息:%j',
|
||||||
name,
|
command,
|
||||||
new Date().toLocaleString(),
|
new Date().toLocaleString(),
|
||||||
stderr,
|
stderr,
|
||||||
);
|
);
|
||||||
|
@ -44,8 +44,8 @@ export default class ScheduleService {
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
await this.logger.info(
|
await this.logger.info(
|
||||||
'执行任务`%s`失败,时间:%s, 错误信息:%j',
|
'执行任务%s失败,时间:%s, 错误信息:%j',
|
||||||
name,
|
command,
|
||||||
new Date().toLocaleString(),
|
new Date().toLocaleString(),
|
||||||
error,
|
error,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user