[PATCH 0/8] admin: Introduce runtime logging APIs

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

 



Because all the necessary refactors to the logging code have been merged for
some time already, now it's time to finally enable the logging APIs. 
Since there's been an effort to deprecate the concept of the log_level
setting in the config (as per discussion [1]), I dropped patches introducing
APIs handling the logging level, even though I still think that for an average
user it's easier to just turn on debug logs by setting log_level to 1 compared
to the alternative way using filters only - kind of like this:
"1:conf 1:cpu 1:network 1:secret 1:security 1:storage 1:qemu 1:util" etc. to
override the default global logging level 3.

Since we treat an unset log_output variable the same way as an explicit empty
string in the config - we use a default logging output - it is necessary to
store the default logging output we can fallback to later once a user tries to
set the logging outputs to an empty string, assuming that it would turn the
logging off (which kind of would be the intuitive approach) which it can't,
since the only way to do it is to use X:file:/dev/null.
The decision for the default logging output is supposed to be made at
the daemon's start only and we should really only use getters throughout our
code to retrieve the default output, not try to set it (because the variable is
not protected by a mutex by design for the reason above).

[1] https://www.redhat.com/archives/libvir-list/2016-March/msg01575.html

Erik Skultety (8):
  daemon: Introduce daemonSetLoggingDefaults
  virlog: Introduce virLog{Get,Set}DefaultOutput
  daemon: Hook up the virLog{Get,Set}DefaultOutput to the daemon's init
    routine
  admin: Introduce virAdmConnectGetLoggingOutputs
  admin: Introduce virAdmConnectGetLoggingFilters
  admin: Introduce virAdmConnectSetLoggingOutputs
  admin: Introduce virAdmConnectSetLoggingFilters
  virt-admin: Wire-up the logging APIs

 daemon/admin.c                  | 115 ++++++++++++++++++++++++++++++
 daemon/libvirtd.c               |  93 ++++++++-----------------
 include/libvirt/libvirt-admin.h |  16 +++++
 src/admin/admin_protocol.x      |  50 ++++++++++++-
 src/admin/admin_remote.c        |  86 +++++++++++++++++++++++
 src/admin_protocol-structs      |  26 +++++++
 src/libvirt-admin.c             | 151 ++++++++++++++++++++++++++++++++++++++++
 src/libvirt_admin_private.syms  |   6 ++
 src/libvirt_admin_public.syms   |   4 ++
 src/libvirt_private.syms        |   2 +
 src/util/virlog.c               |  99 +++++++++++++++++++++++++-
 src/util/virlog.h               |   2 +
 tools/virt-admin.c              | 141 +++++++++++++++++++++++++++++++++++++
 13 files changed, 725 insertions(+), 66 deletions(-)

-- 
2.5.5

--
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