From fa450151401fd9607cbbc6eacc0c3277b5816bed Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Thu, 16 Mar 2023 06:34:54 +0100 Subject: [PATCH] mech: debug transactions For observability. All transactions that reach ietf-system are logged with LOG_DEBUG log level. See /var/log/debug for details. Signed-off-by: Joachim Wiberg --- src/mech/src/ietf-system/Makefile.am | 2 +- src/mech/src/ietf-system/ietf-system.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mech/src/ietf-system/Makefile.am b/src/mech/src/ietf-system/Makefile.am index d4dba393..66648627 100644 --- a/src/mech/src/ietf-system/Makefile.am +++ b/src/mech/src/ietf-system/Makefile.am @@ -5,4 +5,4 @@ backend_LTLIBRARIES += ietf-system.la ietf_system_la_CFLAGS = $(backend_cflags) ietf_system_la_LDFLAGS = $(backend_ldflags) ietf_system_la_LIBADD = $(backend_libadd) -ietf_system_la_SOURCES = ietf-system.c +ietf_system_la_SOURCES = ietf-system.c $(top_srcdir)/src/core/common.h diff --git a/src/mech/src/ietf-system/ietf-system.c b/src/mech/src/ietf-system/ietf-system.c index 312edff5..52683089 100644 --- a/src/mech/src/ietf-system/ietf-system.c +++ b/src/mech/src/ietf-system/ietf-system.c @@ -5,9 +5,7 @@ #include #include -#include -#include -#include +#include "common.h" static augeas *aug; @@ -58,6 +56,8 @@ int ietf_sys_tr_commit(clicon_handle h, transaction_data td) int slen = 0, tlen = 0, err = -EINVAL; cxobj **ssys, **tsys; + show_transaction("ietf-system", td, true); + if (src && clixon_xml_find_instance_id(src, yspec, &ssys, &slen, "/sys:system") < 0) goto err;