Redirect log lines to a file, without keeping them in the main log

0

I have configured in RSYSLOG, a rule so that the lines of the Fw (which are already tagged), are redirected to a specific file, so that:

  

: msg, startswith, "MyFirewall" - / milog / firewall.log & stop

     

: msg, regex, "^ [[0-9] . [0-9] *] MyFirewall" - / milog / firewall.log &   stop

It works fine, but they're still showing up in the main log, either in / var / log / syslog or showing with "journalctl -f -a", and the volume is very loud and messy.

How could I prevent them from showing up in the general log?

    
asked by Bypper 13.10.2017 в 11:54
source

1 answer

0

Actually, the rule works with the output of / var / log / syslog , which I see does not leave the lines of " MyFirewall ", but if you analyze with " journalctl ", it is not governed by the rsyslog filters, and you should filter based on its directives (units ... and others).

    
answered by 13.10.2017 в 12:40