example.xml is a fixed[1] version of the documentation version
syslog-ng.conf is a copy of the documentation example
All testing and example carried out on CentOS:
[nick@localhost ~]$ cat /etc/redhat-release ; uname -a; rpm -qa | grep syslog-ng
CentOS Linux release 7.2.1511 (Core)
Linux CentOSvm.local 3.10.0-327.3.1.el7.x86_64 #1 SMP Wed Dec 9 14:09:15 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
syslog-ng-3.5.6-1.el7.x86_64
[nick@localhost ~]$
[1] fixed by Fabien Wernli
Improvements with the help of Alex Deprez:
- New Test machine - CentOS7 with Syslog-NG 3.5.6
- Test logfile needed to be prepended with
${PROGRAM}
, in this case that isssh
- Output template needed variable escaping
- Additional output showing that tests can use the
-M
message switch instead of-f
input file