From 9f7bf1f6b83194ea39ba8c236f3b9dc4b16810a3 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 1 Nov 2021 23:06:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=A4=B1=E8=B4=A5=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/schedule.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/back/services/schedule.ts b/back/services/schedule.ts index 99493537..7c6bb3ac 100644 --- a/back/services/schedule.ts +++ b/back/services/schedule.ts @@ -26,8 +26,8 @@ export default class ScheduleService { exec(command, async (error, stdout, stderr) => { if (error) { await this.logger.info( - '执行任务`%s`失败,时间:%s, 错误信息:%j', - name, + '执行任务%s失败,时间:%s, 错误信息:%j', + command, new Date().toLocaleString(), error, ); @@ -35,8 +35,8 @@ export default class ScheduleService { if (stderr) { await this.logger.info( - '执行任务`%s`失败,时间:%s, 错误信息:%j', - name, + '执行任务%s失败,时间:%s, 错误信息:%j', + command, new Date().toLocaleString(), stderr, ); @@ -44,8 +44,8 @@ export default class ScheduleService { }); } catch (error) { await this.logger.info( - '执行任务`%s`失败,时间:%s, 错误信息:%j', - name, + '执行任务%s失败,时间:%s, 错误信息:%j', + command, new Date().toLocaleString(), error, );