[syslog-ng] syslog-ng 2.0.4 How can syslog-ng achievethisperformance???

Geller, Sandor (IT) Sandor.Geller at morganstanley.com
Wed Jun 20 11:44:00 CEST 2007


> diff --git a/src/logwriter.c b/src/logwriter.c
> index eea6814..955c333 100644
> --- a/src/logwriter.c
> +++ b/src/logwriter.c
> @@ -499,7 +499,7 @@ log_writer_options_init(LogWriterOptions 
> *options, GlobalConfig *cfg, guint32 fl
>    options->template = template;
>    options->flags = flags;
>    if (options->fifo_size == -1)
> -    options->fifo_size = MIN(1000, cfg->log_fifo_size);
> +    options->fifo_size = MAX(1000, cfg->log_fifo_size);
>    if (options->use_time_recvd == -1)
>      options->use_time_recvd = cfg->use_time_recvd;

With this patch there will be a problem when someone tries to use
log_fifo_size lower than 1000 :) Why not using the same value as
cfg->log_fifo_size? It defaults to 1000, so you'll set up a sane
value if there wasn't log_fifo_size specified in the config file.
Another solution would be to sanitise the value later, and send a
warning message when it needs to be fixed.

Regards,

Sandor
--------------------------------------------------------

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.


More information about the syslog-ng mailing list