Open linus-komnick opened 2 years ago
I'd still be interested in the correct syntax! Though for now, I ended up using the following in /etc/rsyslog.conf
:
local0.* -/var/log/broker.log
And since I'm using docker, I had to make sure to add the following to the run command:
--log-opt syslog-facility=local0
Or alternatively update /etc/docker/daemon.json with the desired facility:
{
"log-driver": "syslog",
"log-opts": {
"syslog-address": "tcp://127.0.0.1:514",
"syslog-facility": "local0"
}
}
This will require you to restart docker:
systemctl restart docker
I'm trying to write all logs of my
broker.js
node application to/var/log/broker.log
. In my syslog config file (/etc/rsyslog.conf
), I do as stated in the documentation:However, when I restart syslog I get the following error:
It looks like something is wrong with the syntax, but I don't know where I can find the correct syntax. Does anybody know how to fix this? Thx in advance!