]> git.ipfire.org Git - thirdparty/libvirt.git/commit
daemon: logging: Fix --verbose option being ignored by the daemon
authorErik Skultety <eskultet@redhat.com>
Fri, 25 Aug 2017 14:58:51 +0000 (16:58 +0200)
committerErik Skultety <eskultet@redhat.com>
Mon, 28 Aug 2017 14:42:13 +0000 (16:42 +0200)
commitb988f794e307fc6421ea7b13292a048bdca94f6a
tree162c42163e3e801b468035460d57f6f14e14a7bc
parent1f43393283ff04d1a3905abb3669cdd5665610b4
daemon: logging: Fix --verbose option being ignored by the daemon

Commit 94c465d0 refactored the logging setup phase but introduced an
issue, where the daemon ignores verbose mode when there are no outputs
defined and the default must be used. The problem is that the default
output was determined too early, thus ignoring the potential '--verbose'
option taking effect. This patch postpones the creation of the default
output to the very last moment when nothing else can change. Since the
default output is only created during the init phase, it's safe to leave
the pointer as NULL for a while, but it will be set eventually, thus not
affecting runtime.
Patch also adjusts both the other daemons.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1442947

Signed-off-by: Erik Skultety <eskultet@redhat.com>
daemon/libvirtd.c
src/locking/lock_daemon.c
src/logging/log_daemon.c
src/util/virlog.c