[syslog-ng] How can i log messages from slapd in one file and, not /var/log/messages

Gustavo Mendes de Carvalho gmcarvalho at gmail.com
Sat Aug 12 19:36:02 CEST 2006


Fernando,

I have this filters and destinatiosn in my configuration file:

#==============
source s_all { unix-stream("/dev/log"); internal(); };

destination d_ldap      { file("/var/log/ldap.log");    };

filter f_syslog         { not facility(auth, authpriv) and not 
match(slapd); };

filter f_ldap           { match("slapd");               };

log { source(s_all); filter(f_syslog); destination(d_syslog);           };

log { source(s_all); filter(f_ldap); destination(d_ldap);               };
#===============

Tha's all that you need to send all ldap messages to one single file.

Gustavo
> Date: Fri, 11 Aug 2006 12:15:03 -0300
> From: "Fernando Loureiro" <loureiro.fernando at gmail.com>
> Subject: [syslog-ng] How can i log messages from slapd in one file and
> 	not	/var/log/messages
> To: syslog-ng at lists.balabit.hu
> Message-ID:
> 	<a000e3310608110815i15f6a5b5rdc513481f3bae7ee at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> Hi All,
>
> I want to know how can i have all my log messages inside a file called
> slapd.log.
>
> Actually it´s logging most messages in /var/log/messages and some in
> /var/log/slapd/slapd.log.
>
> I created the following filter for this daemon:
>                                    filter  f_openldap  {
> program(slapd);                            };
>
> And, by the way, i don´t know whenever to use which of those filter
> functions. Can somebody explain me?
>
>
> Att,
> -- Fernando
>   




More information about the syslog-ng mailing list