log: introduce "none" logging backend
In initrd, the NM service should write logs to both the active console
and the journal. To achieve that, NetworkManager is started with
--debug
to output logs to stderr, and the systemd unit is configured
with StandardError=tty
to redirect messages to the console. NM is
configured with logging.backend=journal
to also save logs in the
journal. The problem of this approach is that when the system doesn't
have a console, the NM service fails to start [1].
This can be solved by using StandardError=journal+console
which
forwards messages from stderr to journald (which in turn also writes
them to the console if available). To avoid duplicates entries in the
journal, we need a way to disable all logging backends in NM and only
write to stderr.
Introduce a none
logging backend. Of course, it's not recommended to
start NM without logging; therefore the none
backend can't be used
as build-time default. none
only makes some sense when also starting
NM with --debug
.
[1] https://github.com/coreos/fedora-coreos-tracker/issues/943