[syslog-ng] checking configuration file syntax

Pavel Shaydo pshaydo at elverils.com
Wed Dec 10 11:44:51 CET 2008


Oh, I was wrong, it checks syntax. It just doesn't checks identifiers,
so it can't catch errors like:

log l_demo { source(s_locl); destination(d_log); }

where I misspelled s_local. Is there any way to catch such errors too
without restarting syslog?

-- 
Best regards,
Pavel Shaydo


On Wed, 2008-12-10 at 10:39 +0000, Fegan, Joe wrote:
> I use the following syntax successfully on 2.0.7:
> 
> # syslog-ng --syntax-only --cfgfile=file-to-check
> 
> It returns exit code 0 if everything is ok, something else otherwise.
> 
> -----Original Message-----
> From: syslog-ng-bounces at lists.balabit.hu [mailto:syslog-ng-bounces at lists.balabit.hu] On Behalf Of Pavel Shaydo
> Sent: 10 December 2008 10:16
> To: syslog-ng
> Subject: [syslog-ng] checking configuration file syntax
> 
> Hello all!
> 
> I'm trying to automate configuration file syntax checking and can't
> figure out how I can do it. According to manual -s option should perform
> syntax checking. I'm trying following:
> 
> syslog-ng -s -f file-to-check
> 
> It always exits with zero status and never outputs anything, regardless
> of correct configuration file or it contains errors. Is there something
> I missed? I tested it on 2.0.9 and on premium edition 2.1.11a.
> 
> 
> --
> Best regards,
> Pavel Shaydo
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
> 
> ______________________________________________________________________________
> Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
> Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
> FAQ: http://www.campin.net/syslog-ng/faq.html
> 



More information about the syslog-ng mailing list