在Ubuntu中配置syslogd


14

在CentOS和许多其他发行版中,您可以syslogd使用进行配置,/etc/syslog.conf但是在Ubuntu中则没有这样的文件。我应该编辑哪个文件以syslogd在Ubuntu中进行配置。

Answers:


13

Ubuntu中的Syslog配置通常在/etc/rsyslog.d/50-default.conf中

顺便说一句 是我喜欢使用的设置:

auth,authpriv.*                                         /var/log/auth.log
cron.*                                                  /var/log/cron.log
mail.=info,mail.=notice                                 -/var/log/mail.info
mail.warning                                            /var/log/mail.err
kern.*                                                  -/var/log/kern.log
*.*;mail,kern,cron,auth,authpriv.none                   -/var/log/syslog

# all warnings except auth into one file
*.warning;auth,authpriv.none                            /var/log/error.log

# Emergencies are sent to everybody logged in.
*.emerg                         *

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.