Description of problem: Run something like this: ------------- for FACIL in auth authpriv cron daemon ftp kern lpr mail \ news syslog user uucp local0 local1 local2 local3 \ local4 local5 local6 local7; do for LEVEL in alert crit debug emerg err info notice warning; do /usr/bin/logger -t TESTING -p ${FACIL}.${LEVEL} \ "Test message at ${FACIL}.${LEVEL}" done done ------------ with a syslog.conf like this: -------------------- auth.* -/var/log/auth_log authpriv.* -/var/log/authpriv_log cron.* -/var/log/cron_log daemon.* -/var/log/daemon_log kern.* /var/log/kern_log lpr.* -/var/log/lpr_log mail.* -/var/log/mail_log news.* -/var/log/news_log user.* -/var/log/user_log uucp.* -/var/log/uucp_log ftp.* -/var/log/ftp_log syslog.* -/var/log/syslog_log local0.* -/var/log/local0_log local1.* -/var/log/local1_log local2.* -/var/log/local2_log local3.* -/var/log/local3_log local4.* -/var/log/local4_log local5.* -/var/log/local5_log local6.* -/var/log/local6_log local7.* -/var/log/local7_log -------------------- Notice how all the messages go to the correct logfile, except the ones for the facility "kern", which silently go to facility "user" Version-Release number of selected component (if applicable): util-linux-2.13-0.52.el5_4.1 How reproducible: Always
man 3 syslog: LOG_KERN kernel messages (these can’t be generated from user processes)
Zut alors. The Ubuntu manpage for syslog.conf is even more precise: > In most cases anyone can log to any facility, so we rely on convention > for the correct facility to be chosen. However, generally only the > kernel can log to the "kern" facility. This is because the > implementation of openlog() and syslog() in glibc does not allow > logging to the "kern" facility. Klogd circumvents this restriction > when logging to syslogd by reimplementing those functions itself. but in that case, would it be useful to - add a corresponding remark to the manpage of the "logger" command and/or - make "logger" warn about messages directed to "kern" facility (might break existing scripts though)
(In reply to comment #2) > Zut alors. > - add a corresponding remark to the manpage of the "logger" command Good point. Added to the upstream tree. Thanks.