1

My Raspberry PI (running Raspbian Stretch) works 24/7 and many of writings are work in RAM disk (not on SD cards). But there are some unnecessary warnings which are frequently written to log files. I want to skip writing them and I simply can't find what is wrong. I have used this on my previous installations and it works.

For example, if I want to skip "Router Advertisement from", I have in /etc/rsyslog.conf:

:msg, contains, "Router Advertisement from" ~

Instead ~ I have also tried stop and then stop and then ~ but nothing works. And yes, I have restart service (and computer), but strings/warnings are still coming to log file.

Have I missed something?

Aurora0001
  • 6,357
  • 3
  • 25
  • 39
JanezKranjski
  • 141
  • 1
  • 6

1 Answers1

2

The order of the statements in rsyslog.conf is important. If you had a statement in rsyslog.conf that logs everything to /var/log/messages or /var/log/syslog and then placed your filter line after that, you would still see your unwanted entries in /var/log/messages or /var/log/syslog. The order is useful when you want some messages to appear in particular log files but not others.

Also check the status of the rsyslog service to ensure it is running as intended:

systemctl status rsyslog

John Hawthorne
  • 914
  • 5
  • 12