log level.

This commit is contained in:
John Livingston 2023-09-19 16:27:49 +02:00
parent 2289d79c28
commit 437fa4c17b
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC

View File

@ -79,6 +79,12 @@ class BotsCtl {
this.logger.debug(`ModerationBot stdout: ${data as string}`) this.logger.debug(`ModerationBot stdout: ${data as string}`)
}) })
moderationBotProcess.stderr?.on('data', (data) => { 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}`) this.logger.error(`ModerationBot stderr: ${data as string}`)
}) })
moderationBotProcess.on('error', (error) => { moderationBotProcess.on('error', (error) => {