[libvirt] [PATCH] daemon: logging: Fix --verbose option being ignored by the daemon

Ján Tomko jtomko at redhat.com
Mon Aug 28 13:32:31 UTC 2017

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 at 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(-)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20170828/aa8a7e28/attachment-0001.sig>

More information about the libvir-list mailing list