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.