HEADS UP: The Joys of Logging, or subtle behaviour change of logging in the daemons in 4.15
matt at mattgrant.net.nz
Sun Sep 5 06:32:18 UTC 2021
On 4/09/21 7:52 am, Andrew Bartlett via samba-technical wrote:
> On Fri, 2021-09-03 at 18:22 +0200, Ralph Boehme wrote:
>> 1) isn't really problematic, but what shall we do with 2) ? Go for
>> stderr as implemented in the MR or rollback to logging to stdout as
>> did in 4.14?
>> I'd vote for stderr, what do others think ?
>> Please note that the 4.15 release is handing in limbo until this
>> is resolved one way or another. :)
> A major release is the time to get some consistency, we should log to
> stderr, that's where errors should go (compared to stdout).
Here's my 2 cents as a long term Debian Developer, if you don't mind me
chiming in please.
Agree. In all my experiences with IPSEC and other daemon maintenance in
Debian, pushing all the errors/debug to stderr when not logging or
running under systemd init system makes sense. Especially with the
prevalence of systemd as the de facto standard Linux init system.
Please ignore the following if you have tons of experience, just trying
to explain for those following this thread. When going to traditional
daemon mode, there are errors that can happen before logging has been
set up, if for example logging is configured in the config file before
logging is set up. You then probably want to read the config file
before forking off into the background so if there are any errors there
they are reported instead of being blindly not reported. There are also
problems with creating PID files that you wan to know about before
forking as well.
Hope I was helpful.
> Andrew Bartlett
More information about the samba-technical