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"
阅读(774) | 评论(0) | 转发(0) |