Answer the question
In order to leave comments, you need to log in
How to configure rsyslog?
It is necessary to move the logging of the program to separate directories. Set up rotate so that every time the service is restarted, a new log file is created. I have already moved the log to a separate directory. But how to set up something to exclude
"node" and the log is not written to /var/log/syslog ? Thanks in advance ))
Answer the question
In order to leave comments, you need to log in
I use the following config file /etc/rsyslog.d/99-node.conf :
:programname, startswith, "node" -/var/log/node/node.log
& ~
But in the /etc/rsyslog.d directory there is the default file, which stores the configuration for writing to syslog, auth, kernel and others. This config is loaded first and therefore it writes everything to syslog.
Whatever writes to syslog, you need to specify this configuration in the master file /etc/rsyslog.conf before writing
$IncludeConfig /etc/rsyslog.d/*.conf .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question