rsyslogd 后台进程负责搜集来自应用程序与内核的服务消息,然后送至日志档内 (通常保存在 /var/log/ 文件夹内)。遵守 /etc/rsyslog.conf 配置文件的要求。
auth 和 authpriv:用于授权;
cron:来自任务调度服务, cron 和 atd;
daemon:影响未分类的守护进程(DNS, NTP等);
ftp:涉及FTP 服务器;
kern:源于内核的消息;
lpr:源于打印子系统;
mail:源于电子邮件子系统;
news:Usenet 子系统消息(主要源自NNTP -网络消息传输协议-管理新闻组的服务器);
syslog:源于 syslogd 服务自身的消息;
user:用户消息(通用);
uucp:源于UUCP(Unix to Unix Copy Program,一种老式的分发电子邮件消息的协议)服务的消息;
local0 到 local7:保留本地使用。
emerg:“救命!” 紧急状态,系统可能已挂了。
alert:赶快,任何推迟都是危险的,必须马上采取行动;
crit:情况很严重;
err:错误;
warn:警告(潜在的错误);
notice:正常情况,但是该消息很重要;
info:提供信息;
debug:调试消息。
/etc/rsyslog.conf file is detailed in the rsyslog.conf(5) manual page, but there is also HTML documentation available in the rsyslog-doc package (/usr/share/doc/rsyslog-doc/html/index.html). The overall principle is to write “selector” and “action” pairs. The selector defines all relevant messages, and the action describes how to deal with them.
subsystem清单及配对的priority(例如: auth.notice;mail.info)。星号(“*”)代表所有的子系统和优先级(例如: *.alert 或者 mail.*)。几个子系统可以通过逗号(“,”)合并成组(例如: auth,mail.info)。优先级指明相同或更高优先级的消息;因此 auth.alert 指具有 alert 和 emerg 优先级的auth 子系统消息。惊叹号(“!”)前缀表示求反,换句话说指低等级的优先级;因此 auth.!notice指有 auth产生的具有 info 或 debug 优先级的消息。等号(“=”)前缀表示精确指定某种优先级(auth.=notice 只关心具有 notice 优先级的 auth 消息)。优先级依次为:debug, info, notice, warning/warn, err/error , crit, alert, emerg/panic。
kern.info;kern.!err 表示源于内核优先级在 info 和 warn之间的消息。 none 优先级指示空集(无优先级),可用于从集合中排除一个子系统消息。于是, *.crit;kern.none 指所有优先级等于或高于 crit 但不是来自内核的消息。