[syslog-ng] Testing log paths

Ryan Owen ryaowe at gmail.com
Thu Jun 8 21:32:32 CEST 2006


I'm looking for a way to test a syslog-ng configuration to see if a
given message (generated by the local machine) will be logged.  This
is for automated policy compliance measurement.  For example, I need a
program or script to be able to tell me if all authpriv messages with
priority debug or higher are logged somewhere.

With the old syslog stuff, the config file was easy enough to parse
that a program could fairly easily determine this.  Syslog-ng's
extremely flexible configuration mechanism is somewhat more difficult,
though.

My current thinking is to take the lex/yacc grammar from the source
and use it to write a program that could accept a message and return
where it would be logged, if at all.  This is still a pretty complex
task, though, so I was hoping that perhaps there would be a simpler
way.  I'm not allowed to generate bogus log entries, or else I'd try
spoofing a message of whatever facility/priority/etc that I needed to
test for.

Does anyone know of a better way to accomplish this?

Thanks in advance for the help!

-Ryan


More information about the syslog-ng mailing list