[syslog-ng] defining stats() option causes syntax error when starting syslog-ng

Balazs Scheidler bazsi at balabit.hu
Fri Jan 13 14:16:05 CET 2006


On Fri, 2006-01-13 at 08:07 +0100, Sandor Geller wrote:
> def wrote:
> > My syslog is filled with STATS lines every 2 minutes so I decided to 
> > delay the stats every 1 hour, or 3600 seconds.  I added this to my 
> > options line but it causes a syntax error in the conf. The problem also 
> > occurred in the previous 1.9 build.
> > 
> > Slackware 10.2
> > # uname -a && syslog-ng -V
> > Linux santo 2.6.14.3 #1 Wed Dec 7 22:59:32 EST 2005 i686 unknown unknown 
> > GNU/Linux
> > syslog-ng 1.9.8
> > 
> > # cat /usr/local/etc/syslog-ng.conf | grep options
> > options { stats(3600); long_hostnames(off); sync(0); };
> 
> stats_freq is the name of that option in the 1.9.x branch, not just stats
> 

I've added a compatibility alias for this option:

--- orig/src/cfg-lex.l
+++ mod/src/cfg-lex.l
@@ -70,11 +70,12 @@ static struct keyword keywords[] = {
        { "pad_size",           KW_PAD_SIZE },
        { "mark_freq",          KW_MARK_FREQ },
        { "stats_freq",         KW_STATS_FREQ },
+       { "stats",              KW_STATS_FREQ },   /* obsolete */
        { "flush_lines",        KW_FLUSH_LINES },
        { "flush_timeout",      KW_FLUSH_TIMEOUT },
        /* obsolete */
        { "sync_freq",          KW_FLUSH_LINES },
-       { "sync",               KW_FLUSH_LINES },
+       { "sync",               KW_FLUSH_LINES },  /* obsolete */
        { "fsync",              KW_FSYNC },
        { "long_hostnames",     KW_CHAIN_HOSTNAMES },
         { "chain_hostnames",    KW_CHAIN_HOSTNAMES },



-- 
Bazsi




More information about the syslog-ng mailing list