[PATCH 0/6] nss: Rework debugging

Michal Privoznik via Devel posted 6 patches 5 months, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/cover.1751634227.git.mprivozn@redhat.com
build-aux/syntax-check.mk      |  2 +-
docs/nss.rst                   | 13 ++++++
tools/nss/libvirt_nss.c        |  8 +++-
tools/nss/libvirt_nss.h        | 30 +-----------
tools/nss/libvirt_nss_leases.c | 12 +++--
tools/nss/libvirt_nss_log.c    | 85 ++++++++++++++++++++++++++++++++++
tools/nss/libvirt_nss_log.h    | 41 ++++++++++++++++
tools/nss/meson.build          |  1 +
8 files changed, 158 insertions(+), 34 deletions(-)
create mode 100644 tools/nss/libvirt_nss_log.c
create mode 100644 tools/nss/libvirt_nss_log.h
[PATCH 0/6] nss: Rework debugging
Posted by Michal Privoznik via Devel 5 months, 1 week ago
I've been debugging a problem with NSS plugin recently [1] and the fact
that I had to recompile libvirt just to enable debugging printings for
the NSS plugin turned out very inconvenient. Make the debug printings
env var dependant and add a few more printings.

1: https://bugzilla.redhat.com/show_bug.cgi?id=2364285

Michal Prívozník (6):
  nss: Promote debug message to proper error when time() fails
  nss: Move logging into a separate file and turn it temporarily on
  nss: Make logging conditional on an envvar
  nss: Include filename in debug printings
  nss: Print module name
  nss: Debug print JSON files as they are parsed

 build-aux/syntax-check.mk      |  2 +-
 docs/nss.rst                   | 13 ++++++
 tools/nss/libvirt_nss.c        |  8 +++-
 tools/nss/libvirt_nss.h        | 30 +-----------
 tools/nss/libvirt_nss_leases.c | 12 +++--
 tools/nss/libvirt_nss_log.c    | 85 ++++++++++++++++++++++++++++++++++
 tools/nss/libvirt_nss_log.h    | 41 ++++++++++++++++
 tools/nss/meson.build          |  1 +
 8 files changed, 158 insertions(+), 34 deletions(-)
 create mode 100644 tools/nss/libvirt_nss_log.c
 create mode 100644 tools/nss/libvirt_nss_log.h

-- 
2.49.0
Re: [PATCH 0/6] nss: Rework debugging
Posted by Ján Tomko via Devel 5 months ago
On a Friday in 2025, Michal Privoznik via Devel wrote:
>I've been debugging a problem with NSS plugin recently [1] and the fact
>that I had to recompile libvirt just to enable debugging printings for
>the NSS plugin turned out very inconvenient. Make the debug printings
>env var dependant and add a few more printings.
>
>1: https://bugzilla.redhat.com/show_bug.cgi?id=2364285
>
>Michal Prívozník (6):
>  nss: Promote debug message to proper error when time() fails
>  nss: Move logging into a separate file and turn it temporarily on
>  nss: Make logging conditional on an envvar
>  nss: Include filename in debug printings
>  nss: Print module name
>  nss: Debug print JSON files as they are parsed
>
> build-aux/syntax-check.mk      |  2 +-
> docs/nss.rst                   | 13 ++++++
> tools/nss/libvirt_nss.c        |  8 +++-
> tools/nss/libvirt_nss.h        | 30 +-----------
> tools/nss/libvirt_nss_leases.c | 12 +++--
> tools/nss/libvirt_nss_log.c    | 85 ++++++++++++++++++++++++++++++++++
> tools/nss/libvirt_nss_log.h    | 41 ++++++++++++++++
> tools/nss/meson.build          |  1 +
> 8 files changed, 158 insertions(+), 34 deletions(-)
> create mode 100644 tools/nss/libvirt_nss_log.c
> create mode 100644 tools/nss/libvirt_nss_log.h
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano