Hi, AFAIK such errors can't be catched with the syntax check. The file is syntactically correct, so the lexer used for parsing the configfile returns without an error. The references are only verified when syslog-ng actually initialises, which won't happen when you're running it with -s. Regards, Sandor
-----Original Message----- From: syslog-ng-bounces@lists.balabit.hu [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Pavel Shaydo Sent: Wednesday, December 10, 2008 11:45 AM To: Syslog-ng users' and developers' mailing list Subject: Re: [syslog-ng] checking configuration file syntax
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@lists.balabit.hu [mailto:syslog-ng-bounces@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
______________________________________________________________ ________________ 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
-------------------------------------------------------- NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.