Re: [PATCH v2 01/10] virlog: Introduce virLog{Get, Set}DefaultOutput

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/25/2016 08:11 AM, Erik Skultety wrote:
> These helpers will manage the log destination defaults (fetch/set). The reason
> for this is to stay consistent with the current daemon's behaviour with respect
> to /etc/libvirt/<daemon>.conf file, since both assignment of an empty string
> or not setting the log output variable at all trigger the daemon's decision on
> the default log destination which depends on whether the daemon runs daemonized
> or not.
> This patch also changes the logic of the selection of the default
> logging output compared to how it is done now. The main difference though is
> that we should only really care if we're running daemonized or not, disregarding
> the fact of (not) having a TTY completely (introduced by commit eba36a3878) as
> that should be of the libvirtd's parent concern (what FD it will pass to it).
> 
>  Before:
>  if (godaemon || !hasTTY):
>      if (journald):
>          use journald
> 
>  if (godaemon):
>      if (privileged):
>          use SYSCONFIG/libvirtd.log
>      else:
>          use XDG_CONFIG_HOME/libvirtd.log
>  else:
>      use stderr
> 
>  After:
>  if (godaemon):
>      if (journald):
>          use journald
> 
>      else:
>          if (privileged):
>              use SYSCONFIG/libvirtd.log
>          else:
>              use XDG_CONFIG_HOME/libvirtd.log
>  else:
>      use stderr
> 
> Signed-off-by: Erik Skultety <eskultet@xxxxxxxxxx>
> ---
>  src/libvirt_private.syms |  2 ++
>  src/util/virlog.c        | 92 ++++++++++++++++++++++++++++++++++++++++++++++++
>  src/util/virlog.h        |  2 ++
>  3 files changed, 96 insertions(+)
> 

ACK

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux