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

Balazs Scheidler bazsi at balabit.hu
Fri Mar 4 16:15:24 CET 2011


On Fri, 2011-03-04 at 11:41 +0100, Gergely Nagy wrote:
> Balazs Scheidler <bazsi at balabit.hu> writes:
> >> 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.
> >
> > I guess all the rest should be implemented this way.
> >
> > I really like the patch, so please post an updated patch for inclusion.
> 
> I updated the patch, and its available from the
> integration/global-suppress branch (rebased onto the tip of your master
> branch as of an hour or so ago) of my syslog-ng-3.3 repo at:
> 
>   git://git.balabit.hu/algernon/syslog-ng-3.3.git
> 
> The updated patch is included below:
> 
> --8<---------------cut here---------------start------------->8---

Applied, thanks.

-- 
Bazsi




More information about the syslog-ng mailing list