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)