local0-local7 in syslog

来源:互联网 发布:彭雪茹 知乎 编辑:程序博客网 时间:2024/05/23 17:00
local0-local7 are local facilities defined by the user, to log specific deamons

for example:
you can change the sshd_config file ( which is the configuration file of the sshd deamon ) 
from 
Syslogfacility authpriv
to 
Syslogfacility local7

and add the following line in the /etc/rsyslog.conf file 
local7.* /var/log/sshd.log 
after restarting rsyslogd and sshd, any ssh sessions to the server will be logged in the /var/log/sshd.log file
0 0
原创粉丝点击