From d1b53f4c3ae88a9023ed01aebde451433a6e1991 Mon Sep 17 00:00:00 2001 From: softsimon Date: Thu, 15 Apr 2021 21:16:56 +0400 Subject: [PATCH] Syslog priority comparison fix. --- backend/src/logger.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/logger.ts b/backend/src/logger.ts index 8c7548d24..f14af0104 100644 --- a/backend/src/logger.ts +++ b/backend/src/logger.ts @@ -93,7 +93,7 @@ class Logger { prionum = Logger.priorities[priority] || Logger.priorities.info; consolemsg = `${this.ts()} [${process.pid}] ${priority.toUpperCase()}:${network} ${msg}`; - if (config.SYSLOG.ENABLED && Logger.priorities[priority] >= Logger.priorities[config.SYSLOG.MIN_PRIORITY]) { + if (config.SYSLOG.ENABLED && Logger.priorities[priority] <= Logger.priorities[config.SYSLOG.MIN_PRIORITY]) { syslogmsg = `<${(Logger.facilities[config.SYSLOG.FACILITY] * 8 + prionum)}> ${this.name}[${process.pid}]: ${priority.toUpperCase()}${network} ${msg}`; this.syslog(syslogmsg); }