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

Erik Skultety eskultet at redhat.com
Mon Aug 28 14:43:18 UTC 2017


On Mon, Aug 28, 2017 at 03:32:31PM +0200, Ján Tomko wrote:
> 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(-)
> >
>
> ACK

I switched the BZ to https://bugzilla.redhat.com/show_bug.cgi?id=1442947
because I'd closed the original as duplicate of this one, solely because this
one had been filed earlier. Anyhow, the patch is now pushed.

Thanks,
Erik

>
> Jan





More information about the libvir-list mailing list