[CentOS] Discarding empty lines in rsyslog
Anand Buddhdev
anandb at ripe.netMon Feb 29 14:59:13 UTC 2016
- Previous message: [CentOS] Problems with ProxyPass to a local ip (using SSL)
- Next message: [CentOS] Discarding empty lines in rsyslog
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Dear CentOS folk, I've been try to solve one issue with rsyslog on CentOS 6, but can't figure it out. I've searched through rsyslog documentation, and used Google but not found anything that matches my issue. I'm sending output of a program to rsyslog using "logger -t progname". I've got the following config snippet in /etc/rsyslog.d: $FileCreateMode 0644 if $programname == 'progname' then /var/log/prog.log & ~ This works. However, the program sometimes produces blank lines its output, and they get logged by rsyslog as well. I want to make rsyslog ignore empty lines. I am trying the following, but it doesn't work: if $programname == 'progname' and $msg != '\n' then /var/log/prog.log Does anyone know how to get this to work in rsyslog? This is rsyslog 5 on CentOS 6. Regards, Anand
- Previous message: [CentOS] Problems with ProxyPass to a local ip (using SSL)
- Next message: [CentOS] Discarding empty lines in rsyslog
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list