Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5359995
  • 博文数量: 1144
  • 博客积分: 11974
  • 博客等级: 上将
  • 技术积分: 12312
  • 用 户 组: 普通用户
  • 注册时间: 2005-04-13 20:06
文章存档

2017年(2)

2016年(14)

2015年(10)

2014年(28)

2013年(23)

2012年(29)

2011年(53)

2010年(86)

2009年(83)

2008年(43)

2007年(153)

2006年(575)

2005年(45)

分类: LINUX

2006-08-02 09:34:56

SeparateLogFile
From: Matt Kettler Date: Thu, 10 Jun 2004 12:24:14 -0400

At 03:51 AM 6/10/2004, Bo-Lina teknisk support wrote:
>Is there anny way of getting SA logging into a separate file instead of
>putting it into syslog?
Actually, I suspect you really have the problem backwards.. Rather than avoiding using syslog with SA, you're probably better off configuring syslog to put log messages where you want them.

Pick an unused local facility ie local5.

Configure SA log to that facility by using the -s parameter.

         spamd -s local5
Configure your syslogd to dump local5.* into a separate file, and exclude it from your other logs. Here's a quick syslog.conf example:

         *.info;mail.none;authpriv.none;cron.none;local5.none;    /var/log/messages
         local5.*;         /var/log/spamassassin
This is the same kind of configuration with syslog-ng which mostly part of the modern systems, separate mail logs from other:

destination mail { file("/var/log/mail"); };
destination messages { file("/var/log/messages"); };

filter f_mail { facility(mail, news) and not match (imapd); };
filter f_messages { level(info..warn) and not facility(mail, news); };

log { source(src); filter(f_mail); destination(mail); };
log { source(src); filter(f_messages); destination(messages); };
Once you understand how to use syslog properly, you won't have problems like this. After all... syslog IS a pervasive element of unix.You can't avoid it forever. It's better to learn how to use it, rather than trying to figure out how to go around it all the time on a per-program basis.

last edited 2005-04-01 08:38:48 by RajaMustaq

 

阅读(1121) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~