From 1f950b516e892004bf0816d946f808815ec21023 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Fri, 29 Dec 2023 20:21:52 +0800 Subject: [PATCH] refactor: improve error report message --- src/server/model/monitor/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/server/model/monitor/index.ts b/src/server/model/monitor/index.ts index 6f69678..ce3d623 100644 --- a/src/server/model/monitor/index.ts +++ b/src/server/model/monitor/index.ts @@ -119,7 +119,7 @@ class MonitorManager { this.monitorRunner[m.id] = runner; await runner.startMonitor(); } catch (err) { - console.error('Start monitor error:', err); + console.error('Start monitor error:', String(err)); } }) ).then(() => { @@ -171,7 +171,7 @@ class MonitorRunner { try { value = await provider.run(monitor); } catch (err) { - console.error(err); + logger.error('[Monitor] run error:', String(err)); value = -1; }