Bug 585533
| Summary: | /usr/bin/logger silently redirects logging for "kern" facility to "user" facility | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | David Tonhofer <bughunt> |
| Component: | util-linux | Assignee: | Karel Zak <kzak> |
| Status: | CLOSED NOTABUG | QA Contact: | qe-baseos-daemons |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 5.7 | ||
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2010-04-26 07:05:25 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
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. |
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