我有syslog local7奇怪的问题,我的系统日志configuration系统日志被写入
local7.info /var/log/syslog_info
它的工作很好几年,但近日来一个设备系统日志信息写在控制台上,我不知道为什么这一个设备系统日志控制台上,但其他数百设备系统日志仍写在文件上。 我的问题是我怎么能阻止呢? 我需要该设备的系统日志,所以我不想停止它,但同时我不想写在我的控制台上。 我的Os是64位的Solaris。 谢谢,
这是我的syslog.conf
# *.err;kern.notice;auth.notice /dev/sysmsg *.err;kern.debug;daemon.notice;mail.crit /var/adm/messages *.alert;kern.err;daemon.err operator *.alert root *.emerg * # if a non-loghost machine chooses to have authentication messages # sent to the loghost machine, un-comment out the following line: #auth.notice ifdef(`LOGHOST', /var/log/authlog, @loghost) mail.debug ifdef(`LOGHOST', /var/log/syslog, @loghost) # # non-loghost machines will use the following lines to cause "user" # log messages to be logged locally. # ifdef(`LOGHOST', , user.err /dev/sysmsg user.err /var/adm/messages user.alert `root, operator' user.emerg * ) local7.info /var/log/syslog_info
由于此行,系统syslogconfiguration会将任何err级别以上的日志logging到系统控制台:
*.err;kern.notice;auth.notice /dev/sysmsg
这会logging所有err和更高的信息, notice和更高的kern消息,以及notice和更高的auth消息到系统控制台。 如果您的设备在这些级别上logging消息,这将解释控制台消息。
您可以使用none限定符来禁止来自local7设施的消息,如下所示:
*.err;kern.notice;auth.notice;local7.none /dev/sysmsg
试试看看控制台消息是否停止出现。