[libvirt] [PATCH REPOST 00/38] Introduce APIs to change daemon's logging settings

Erik Skultety eskultet at redhat.com
Mon Jul 4 14:52:08 UTC 2016


On 04/05/16 16:30, Erik Skultety wrote:
> Basically the same series as
> https://www.redhat.com/archives/libvir-list/2016-March/msg01534.html, just
> rebased onto the current HEAD.
> 
> Daniel pointed out in 31/38 maybe we do not want to expose an API to set
> logging level. Despite the truth being that the functionality of logging levels
> can be replaced by logging filters completely, I think that it still provides
> us with more convenience than having to specify a big bunch of filters.
> 
> Erik Skultety (38):
>   virlog: Return void instead of int in virLogReset<Foo> methods
>   virlog: Convert virLogOutputs to a list of pointers to outputs
>   virlog: Convert virLogFilters to a list of pointers to filters
>   virlog: Export virLogOutputPtr through header
>   virlog: Export virLogFilterPtr through header
>   virlog: Introduce virLogSetFilters
>   virlog: Introduce virLogSetOutputs
>   daemon: Replace virLogParseOutputs with virLogSetOutputs in callers
>   daemon: Replace virLogParseFilters with virLogSetFilters in callers
>   virlog: Introduce virLogDefineOutputs
>   virlog: Introduce virLogDefineFilters
>   virlog: Rename virLogAddOutputTo to virLogNewOutput
>   virlog: Rename virLogDefineOutput to virLogOutputNew
>   virlog: Rename virLogDefineFilter to virLogFilterNew
>   virlog: Introduce virLogOutputFree
>   virlog: Introduce virLogOutputListFree
>   virlog: Introduce virLogFilterFree
>   virlog: Introduce virLogFilterListFree
>   virlog: Make virLogReset methods use of virLog(Output|Filter)ListFree
>   virlog: Split output parsing and output defining to separate
>     operations
>   virlog: Split filter parsing and filter defining to separate
>     operations
>   virlog: Split parsing and setting priority
>   virlog: Introduce virLogOutputExists
>   virlog: Make use of virLogOutputExists
>   virlog: Take a special care of syslog when setting new set of log
>     outputs
>   virlog: Swap the new copy of outputs with the global existing one
>   virlog: Rename virLogFiltersSerial to virLogSerial
>   virlog: Make virLogSetDefaultPriority trigger source update as well
>   virlog: Introduce an API mutex that serializes all setters
>   virlog: Acquire virLogAPILock in each setter API
>   admin: Introduce virAdmConnectGetLoggingLevel
>   admin: Introduce virAdmConnectGetLoggingFilters
>   admin: Introduce virAdmConnectGetLoggingOutputs
>   admin: Introduce virAdmConnectSetLoggingLevel
>   admin: Introduce virAdmConnectSetLoggingFilters
>   admin: Introduce virAdmConnectSetLoggingOutputs
>   admin: Export logging level constants via libvirt-admin.h
>   virt-admin: Wire-up the logging APIs
> 
>  daemon/admin.c                  | 126 ++++++++
>  daemon/libvirtd.c               |   8 +-
>  include/libvirt/libvirt-admin.h |  37 +++
>  src/admin/admin_protocol.x      |  74 ++++-
>  src/admin/admin_remote.c        |  86 +++++
>  src/admin_protocol-structs      |  39 +++
>  src/libvirt-admin.c             | 220 +++++++++++++
>  src/libvirt_admin_private.syms  |   9 +
>  src/libvirt_admin_public.syms   |   6 +
>  src/libvirt_private.syms        |  14 +-
>  src/locking/lock_daemon.c       |   8 +-
>  src/logging/log_daemon.c        |   8 +-
>  src/util/virlog.c               | 698 +++++++++++++++++++++++++++-------------
>  src/util/virlog.h               |  50 +--
>  tests/eventtest.c               |   3 +-
>  tests/testutils.c               |  19 +-
>  tests/virlogtest.c              |  12 +-
>  tools/virt-admin.c              | 204 ++++++++++++
>  18 files changed, 1361 insertions(+), 260 deletions(-)
> 

Since I got an ACK on several patches which I didn't push before 2.0
release, so I rebased them onto current master and pushed them now. The
patches I pushed were 1-3, 15-18 (these had some rebase conflicts, so I
resolved them, moved the patches a bit more up in the series and
squashed 4 and 5 to 15 and 17 respectively). I also split 19 in two and
squashed the bits into 16 and 18 as suggested.
I will later split the rest of the series in two parts as Cole
suggested, first one refactoring the logging code and once that is
committed, a second one which introduces new public APIs. Also, patches
regarding APIs to set logging level will be omitted until we come to a
decision how to deprecate it properly.

Erik




More information about the libvir-list mailing list