[syslog-ng] [PATCH]: support setting a default suppress() globally

Gergely Nagy algernon at balabit.hu
Wed Mar 2 00:14:19 CET 2011


'Evening!

On Tue, 2011-03-01 at 21:49 +0100, Balazs Scheidler wrote: 
> Could you please post your patches in-line next time? It is much easier
> to read and react on things that way. Thanks.

Will do. About time I set up my Gnus anyway.

> > diff --git a/modules/affile/affile-grammar.ym b/modules/affile/affile-grammar.ym
> > index 2a7c134..5379b81 100644
> > --- a/modules/affile/affile-grammar.ym
> > +++ b/modules/affile/affile-grammar.ym
> > @@ -132,6 +132,7 @@ dest_affile_params
> >             (*last_driver) = affile_dd_new($1, 0);
> >             free($1);
> >             last_writer_options = &((AFFileDestDriver *) (*last_driver))->writer_options;
> > +           last_writer_options->suppress = configuration->suppress;
> >           }
> >           dest_affile_options                           { $$ = (*last_driver); }
> >         ;
> 
> A better way to do this would be to do the inheritance in the 
> log_writer_options_init() function, just like all the rest of the options.
> 
> E.g. please initialize the per-writer suppress to default to -1 (in 
> log_writer_options_defaults), and in log_writer_options_init() inherit the
> global value if the setting stays at -1.

Understood, I'll update the patch as soon as I get around to it
(probably this weekend, if all goes well).

-- 
|8]





More information about the syslog-ng mailing list