Bug 216756 - syslog(3): example error log message should use LOG_ERR level
Summary: syslog(3): example error log message should use LOG_ERR level
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Books & Articles (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-doc (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2017-02-03 15:00 UTC by Thomas Cort
Modified: 2017-11-05 18:30 UTC (History)
1 user (show)

See Also:


Attachments
patch (360 bytes, patch)
2017-02-03 15:00 UTC, Thomas Cort
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Cort 2017-02-03 15:00:43 UTC
Created attachment 179567 [details]
patch

The man page lists error levels and says that `LOG_ERR` should be used for errors.

In the examples, there's an error being logged "foobar error: %m" (%m fills in the error message based on errno, so we're definitely logging an error here), but it's being logged at the `LOG_INFO` level. If it's an error, I think it should be at the `LOG_ERR` level.

This is present in the latest base HEAD r313159
Comment 1 Benedict Reuschling freebsd_committer freebsd_triage 2017-08-03 09:18:03 UTC
I've opened a review for it here: https://reviews.freebsd.org/D11824
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-11-05 18:25:16 UTC
A commit references this bug:

Author: bcr
Date: Sun Nov  5 18:24:31 UTC 2017
New revision: 325440
URL: https://svnweb.freebsd.org/changeset/base/325440

Log:
  The last example used LOG_INFO, but the message itself said error.
  Change to LOG_ERR to be less confusing.

  PR:			216756
  Submitted by:		Thomas Cort (linuxgeek@gmail.com)
  Reviewed by:		noone (after 2 months)
  Differential Revision:	https://reviews.freebsd.org/D11824

Changes:
  head/lib/libc/gen/syslog.3
Comment 3 Benedict Reuschling freebsd_committer freebsd_triage 2017-11-05 18:30:28 UTC
I've just committed the change to HEAD. Sorry this has been unresolved for so long. PR closed, thanks for filing it.