You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何禁用Node-RED向syslog输出日志?

Fixing Node-RED Syslog Log Duplication in Kubernetes

Got it, let's tackle this issue where Node-RED is duplicating logs to syslog even though you're redirecting console output to a file. The official docs don't explicitly mention syslog configuration, but we can work around that by directly configuring the underlying logging transport.

Step 1: Update your settings.js

Node-RED uses the Winston logging library under the hood, which enables a syslog transport by default. To disable it, you just need to add a syslog block to your logging config and set it to disabled:

// Configure the logging output 
logging: { 
    console: { 
        level: "warn", 
        metrics: false, 
        audit: false 
    },
    // Add this block to disable syslog logging
    syslog: {
        enabled: false
    }
},

Step 2: Restart Node-RED

Apply the changes by restarting your Node-RED instance with your existing startup command:

node /usr/src/node-red/node_modules/node-red/red.js --userDir /data flows.json >> /data/node-red.log 2>&1

Why this works

Even though the official Node-RED logging docs don't call out syslog, the Winston integration includes it as a default transport. By explicitly setting enabled: false for syslog, you're telling Node-RED to only send logs to the console transport—which you're already redirecting to your /data/node-red.log file, perfect for your Kubernetes setup.

Verify the fix

After restarting:

  • Check your /data/node-red.log file to confirm it still captures warn and higher level logs as expected.
  • On your Kubernetes nodes, check the system syslog (typically /var/log/syslog or via journalctl for systemd systems) to ensure no duplicate Node-RED entries are appearing there anymore.

内容的提问来源于stack exchange,提问作者Dennis R

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.09 17:58:16