Subject: Re: [PATCH] daemon: add --no-syslog to undo implicit --syslog

From: Ævar Arnfjörð Bjarmason <[email-masked]>
Date: Tue, 23 Jan 2018 01:00:10 +0100

On Mon, Jan 22 2018, Lucas Werkmeister jotted:

> Several options imply --syslog, without there being a way to disable it
> again. This commit adds that option.

Just two options imply --syslog, --detach & --inetd, unless I've missed
something, anyway 2 != several, so maybe just say "The --detach and
--inetd options imply --syslog ...".

> This is useful, for instance, when running `git daemon` as a systemd
> service with --inetd. systemd connects stderr to the journal by default,
> so logging to stderr is useful. On the other hand, log messages sent via
> syslog also reach the journal eventually, but run the risk of being
> processed at a time when the `git daemon` process has already exited
> (especially if the process was very short-lived, e.g. due to client
> error), so that the journal can no longer read its cgroup and attach the
> message to the correct systemd unit. See systemd/systemd#2913 [1].
>
> [1]: https://github.com/systemd/systemd/issues/2913

This patch looks good, but I wonder if with the rise of systemd there's
a good reason to flip the default around to not having other stuff imply
--syslog, and have users specify this implictly, then we won't need a
--no-syslog option.

But maybe that'll break too much stuff.