From 437fa4c17b6efee135563af72429d9729b01fd5f Mon Sep 17 00:00:00 2001 From: John Livingston Date: Tue, 19 Sep 2023 16:27:49 +0200 Subject: [PATCH] log level. --- server/lib/bots/ctl.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/lib/bots/ctl.ts b/server/lib/bots/ctl.ts index f5822a19..9c7f6c19 100644 --- a/server/lib/bots/ctl.ts +++ b/server/lib/bots/ctl.ts @@ -79,6 +79,12 @@ class BotsCtl { this.logger.debug(`ModerationBot stdout: ${data as string}`) }) moderationBotProcess.stderr?.on('data', (data) => { + // change error level for non-relevant errors: + data = data.toString() + if (/Warning.*NODE_TLS_REJECT_UNAUTHORIZED.*'0'.*TLS/.test(data)) { + this.logger.debug(`ModerationBot stderr: ${data as string}`) + return + } this.logger.error(`ModerationBot stderr: ${data as string}`) }) moderationBotProcess.on('error', (error) => {