On Mon, Aug 28, 2017 at 10:39:15AM +0200, Erik Skultety wrote:
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.
Maybe we need a daemon template and a perl script to generate the code to avoid this kind of duplication?
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1457193 Signed-off-by: Erik Skultety <eskultet redhat com> --- daemon/libvirtd.c | 21 +++++++++++++-------- src/locking/lock_daemon.c | 21 +++++++++++++-------- src/logging/log_daemon.c | 21 +++++++++++++-------- src/util/virlog.c | 7 +++++++ 4 files changed, 46 insertions(+), 24 deletions(-)
Description: Digital signature