Syslog server using syslog-ng

Hello!

I'm very new to all this topic. Can someone give some help or directions about feeding a Syslog server from Node-red? For instance to record a button activity.
Thnks in advance.

Well the Node-RED log is already output to syslog - or more accurately to the systemd journal - if you are running it from a systemd startup (e.g. via Dave's Pi install script).

So you could simply use a debug node set to output to log rather than to the debug panel. Or use a function node with node.log.

You can also output direct to syslog from a bash script by adding something like this early in the script:

# Redirect stdout to syslog - show with: `sudo journalctl -t jk_kou`
exec 1> >(logger -t jk_kou -p local0.info)  # -t $0)
# redirect stderr to syslog
exec 2> >(logger -t jk_kou -p local0.err)

thank you,

I'll try your ideas starting in the funtion node

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.