Re: syslog-ng

2007-10-22 Thread Anders Norrbring
Leon Kolchinsky skrev:
>> Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus
>> logs in their own files.
>>
>> It seems like I just cannot get it right, no matter how I try.
>> So, I'd be grateful for setup info on syslog-ng to accomplish this.
>>
>> Thanks!
>> Anders.
>>
>>
> 
> Hello Anders,
> 
> Look here -
> http://linux.derkeiler.com/Mailing-Lists/SuSE/2007-09/msg01265.html
> 
> Or in short:
> At syslog-ng.conf:
> filter f_cyrus { program("lmtpunix") or program("imap") or
> program("ctl_cyrusdb") or program("cyr_expire") or match("master"); };
> destination cyrus { file("/var/log/cyrus"); };
> log { source(src); filter(f_cyrus); destination(cyrus); };
> 
> 
> Best Regards,
> Leon Kolchinsky

Hi Leon!
I found an even "better" way.. I looked up the source config in the SUSE 
source rpm, and they have rerouted the syslog from the default local6 to 
daemon, so this is what should go into the syslog config;

filter f_cyrus  { facility(daemon); };
destination d_cyrus { file("/var/log/cyrus"); };
log { source(src); filter(f_cyrus); destination(d_cyrus); flags(final); };

This works just great now.. ;)
Anders.


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-22 Thread Leon Kolchinsky
> Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus
> logs in their own files.
> 
> It seems like I just cannot get it right, no matter how I try.
> So, I'd be grateful for setup info on syslog-ng to accomplish this.
> 
> Thanks!
> Anders.
> 
> 

Hello Anders,

Look here -
http://linux.derkeiler.com/Mailing-Lists/SuSE/2007-09/msg01265.html

Or in short:
At syslog-ng.conf:
filter f_cyrus { program("lmtpunix") or program("imap") or
program("ctl_cyrusdb") or program("cyr_expire") or match("master"); };
destination cyrus { file("/var/log/cyrus"); };
log { source(src); filter(f_cyrus); destination(cyrus); };


Best Regards,
Leon Kolchinsky


Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-20 Thread Chris Smith
On Saturday 20 October 2007, Anders Norrbring wrote:
> So, I went to the SUSE sources and looked it up.. Seems like they
> compile with --with-syslogfacility=DAEMON..
> I have no idea what that makes Cyrus do, I tried Google to find some
> answers, but came up empty handed.

You can filter on the DAEMON facility (instead of 'local6' as in my case). If 
there are other apps that use the DAEMON facility then you'll have to break 
it down further, using program names etc. Look at the log entries you now 
have and determine what you can filter by, ie: program names 
of: 'lmtpunix', 'ctl_cyrusdb', and 'master', if others use those as well you 
may need a second level filter with a match statement.

-- 
Chris

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-20 Thread Anders Norrbring
Chris Smith skrev:
> On Friday 19 October 2007, Anders Norrbring wrote:
>> Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus
>> logs in their own files.
>>
>> It seems like I just cannot get it right, no matter how I try.
>> So, I'd be grateful for setup info on syslog-ng to accomplish this.
> 
> My distro sets up cyrus to use the local6 facility for logging. I use the 
> following lines in my syslog-ng.conf (in their proper sections):
> ===
> destination d_local6 { file("/var/log/mail/imapd.log"); };
> filter f_local6 { facility(local6); };
> log { source(src); filter(f_local6); destination(d_local6); flags(final); };
> ===
> 
> Works just fine. I put all of my mail logs in a separate directory 
> (/var/log/mail/).
> Note - you may have to "touch" the destination file to create it.
> 

Nope that didn't work either..
So, I went to the SUSE sources and looked it up.. Seems like they 
compile with --with-syslogfacility=DAEMON..
I have no idea what that makes Cyrus do, I tried Google to find some 
answers, but came up empty handed.

So, anyone with ideas? (Beside recompiling Cyrus...)

Anders

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-19 Thread Chris Smith
On Friday 19 October 2007, Anders Norrbring wrote:
> Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus
> logs in their own files.
>
> It seems like I just cannot get it right, no matter how I try.
> So, I'd be grateful for setup info on syslog-ng to accomplish this.

My distro sets up cyrus to use the local6 facility for logging. I use the 
following lines in my syslog-ng.conf (in their proper sections):
===
destination d_local6 { file("/var/log/mail/imapd.log"); };
filter f_local6 { facility(local6); };
log { source(src); filter(f_local6); destination(d_local6); flags(final); };
===

Works just fine. I put all of my mail logs in a separate directory 
(/var/log/mail/).
Note - you may have to "touch" the destination file to create it.

-- 
Chris

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-19 Thread Chris Smith
On Friday 19 October 2007, Chris Smith wrote:
> On Friday 19 October 2007, Anders Norrbring wrote:
> > Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus
> > logs in their own files.
> >
> > It seems like I just cannot get it right, no matter how I try.
> > So, I'd be grateful for setup info on syslog-ng to accomplish this.
>
> My distro sets up cyrus to use the local6 facility for logging. I use the
> following lines in my syslog-ng.conf (in their proper sections):
> ===
> destination d_local6 { file("/var/log/mail/imapd.log"); };
> filter f_local6 { facility(local6); };
> log { source(src); filter(f_local6); destination(d_local6); flags(final);
> }; ===
>
> Works just fine. I put all of my mail logs in a separate directory
> (/var/log/mail/).
> Note - you may have to "touch" the destination file to create it.

Just adding that, as Baltasar stated, some programs may use the same facility 
and if this is the case you can probably filter on program name (or match, or 
program name and match, etc.). Some that I filter this way are:
=
filter f_cupsd { program(cupsd); };
filter f_dhcpd { program(dhcpd); };
filter f_slapd { program(slapd); };
filter f_rsync { program(rsync); };
=
Normally if the facility is unique I use it for the filter.

-- 
Chris

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: syslog-ng

2007-10-19 Thread FORMER 03 | Baltasar Cevc

You can specify the syslog facility for cyrus at compile time. I think
its some local by default.
Syslog-NG can also filter on the program string, you could use that,  
too.

There is no way that's 100 % sure, though. Some other program could use
the same facility or program name. That's how the syslog protocol works.

Baltasar

_ FORMER 03 GmbH
_ www.former03.de



PGP.sig
Description: This is a digitally signed message part

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html

syslog-ng

2007-10-19 Thread Anders Norrbring
Hi, I need help setting up Cyrus and syslog-ng to have all the Cyrus 
logs in their own files.

It seems like I just cannot get it right, no matter how I try.
So, I'd be grateful for setup info on syslog-ng to accomplish this.

Thanks!
Anders.

Cyrus Home Page: http://cyrusimap.web.cmu.edu/
Cyrus Wiki/FAQ: http://cyrusimap.web.cmu.edu/twiki
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


Re: debug messages + syslog-ng

2006-08-05 Thread Rudy Gevaert

Ow Mun Heng wrote:

Hi All,

All the google pages I've seen has the log daemon as syslog and not the
newer syslog-ng. I want to reduce the amount of debug messages I see in
my logs, How can this be achieved using syslog-ng?


I'm not sure what you mean with the above.  syslog-ng is a syslog 
replacement.  So you can configure syslog-ng to log more debug messages, 
or less debug messages.



Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html


debug messages + syslog-ng

2006-08-04 Thread Ow Mun Heng
Hi All,

All the google pages I've seen has the log daemon as syslog and not the
newer syslog-ng. I want to reduce the amount of debug messages I see in
my logs, How can this be achieved using syslog-ng?


-- 
Ow Mun Heng <[EMAIL PROTECTED]>


Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html