Chinaunix首页 | 论坛 | 博客
  • 博客访问: 61451
  • 博文数量: 25
  • 博客积分: 1899
  • 博客等级: 上尉
  • 技术积分: 250
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-29 23:45
文章分类

全部博文(25)

文章存档

2012年(22)

2010年(3)

我的朋友

分类: LINUX

2012-03-19 23:33:44

1. syslog-ng
参考:
http://blog.chinaunix.net/uid-24171144-id-3132013.html

(1) 在syslog-ng.conf 添加一条tosmu的规则:
filter f_tosmu { match('tosmu'); };
destination tosmu { file("/var/log/tosmu" fsync(yes)); };
log { source(src); filter(f_tosmu); destination(tosmu); };

(2) rcsyslog reload

(3) 打一条日志:
logger -t tosmu "This is my file of osmu, I do it ok, and all is ok"

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