Bug 246845 - LOG_PID is now default but cannot be disabled
Summary: LOG_PID is now default but cannot be disabled
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2020-05-29 15:18 UTC by P Kern
Modified: 2020-07-12 16:26 UTC (History)
1 user (show)

See Also:


Attachments
enable LOG_PID by default but allow LOG_PID to be disabled. (1.75 KB, patch)
2020-05-29 15:18 UTC, P Kern
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description P Kern 2020-05-29 15:18:29 UTC
Created attachment 215026 [details]
enable LOG_PID by default but allow LOG_PID to be disabled.

The change in r332100 means that LOG_PID is permanent.

The reason for the change is fair -- to have LOG_PID enabled by default.

But the change was written so that LOG_PID can never be disabled.

This is a problem for logger(1).

We use logger(1) extensively in many of our shell scripts. The syslog
messages that logger(1) produces are further parsed by other scripts.
Adding a PID to logger(1) entries means we will have to review all
our scripts to make sure the new PID does not break the parsing.
And arguably, a default PID for logger(1) is of limited value since
the PID is just for the logger(1) process itself.

We were in the process of slowly upgrading our systems to FreeBSD-12
when it was noted that new logger(1) messages included a PID by default.

We will now have to suspend the upgrade of some of our main systems
since they depend on shell scripts which make use of logger(1).

We would much prefer to have the expected logger(1) behaviour restored 
rather than to have to review/adjust all our scripts + parsers.



Included is a patch for 2 files which would:

  + enable LOG_PID by default in syslog(3), but allow LOG_PID to be disabled.

  + adjust logger(1) so that it disables LOG_PID by default.