[syslog-ng] Named Log Entries in the Config File

Sandor Geller wildy at balabit.hu
Thu Jan 5 08:17:17 CET 2006


Kenneth Kassing wrote:
> Hello,
> I am writing a program to make updates tho the syslog-ng configuration 
> file.  To allow for easily adding and removing log entries, I updated 
> the parser gramer to allow a name field in the log entry.  The name is 
> optional, so old log files will still work.  This name is not used by 
> syslog-ng in any way.
> 
> 
> Example: Both log entries below are valid with my grammar update.
> 
> log {
>          source(s_all);
>          filter(f_syslog);
>          destination(df_syslog);
> };
> 
> log l_syslog {
>          source(s_all);
>          filter(f_syslog);
>          destination(df_syslog);
> };

You could use another approach (without patching syslog-ng), using only
comments:

#<BEGIN l_syslog>
...
#<END l_syslog>

I used a similar approach for adding/removing sources, destinations and
filters. My update tool was sed :))

-- 
Sandor Geller
wildy at balabit.hu


More information about the syslog-ng mailing list