From 60f8ab7285fc0b3c1dfca5c8857807ba270e9956 Mon Sep 17 00:00:00 2001 From: OidaTiftla Date: Thu, 21 Apr 2022 12:09:59 +0200 Subject: [PATCH] Use new logging mechanism --- server/model/monitor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/model/monitor.js b/server/model/monitor.js index a7e0b82f..0ac2e33e 100644 --- a/server/model/monitor.js +++ b/server/model/monitor.js @@ -473,7 +473,7 @@ class Monitor extends BeanModel { let timeSinceLastNotified = (dayjs.utc().valueOf() - (bean.lastNotifiedTime == null ? 0 : dayjs.utc(bean.lastNotifiedTime).valueOf())) / 1000 / 60; // divide by 1000 to convert from milliseconds to seconds and divide by 60 to convert from seconds to minutes if (timeSinceLastNotified >= this.resendInterval) { // Send notification again, because we are still DOWN - debug(`[${this.name}] sendNotification again: lastNotifiedTime: ${bean.lastNotifiedTime} | current time: ${R.isoDateTime(dayjs.utc())}`); + log.debug("monitor", `[${this.name}] sendNotification again: lastNotifiedTime: ${bean.lastNotifiedTime} | current time: ${R.isoDateTime(dayjs.utc())}`); await Monitor.sendNotification(isFirstBeat, this, bean); // Set last notified time to now