Skip to contentSkip to conversation

Some common changes in ulogs: 1) Added debug log to indicate when stack is created. Helps to debug settings in configs for users

PATCH New Serhii Ivanov 1 participant 1 message Nov 30, 2025 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Some common changes in ulogs: 1) Added debug log to indicate when stack is created. Helps to debug settings in configs for users

2) Properly include defines via
+#include <ulogd/ulogd.h> instead of explicit -#include "../config.h" To be honest explicit way is right way to go, but by 'properly' i mean how other plugins do i.e. 'by voting'

---
 output/ulogd_output_XML.c | 3 +--
 src/ulogd.c               | 1 +
 2 files changed, 2 insertions(+), 2 deletions(-)
output/ulogd_output_XML.c +1 -2
index 0e1ae7b..c661174 100644
@@ -20,7 +20,7 @@
 
 #include <sys/types.h>
 #include <inttypes.h>
-#include "../config.h"
+#include <ulogd/ulogd.h>
 #ifdef BUILD_NFLOG
 #include <libnetfilter_log/libnetfilter_log.h>
 #endif
@@ -30,7 +30,6 @@
 #ifdef BUILD_NFACCT
 #include <libnetfilter_acct/libnetfilter_acct.h>
 #endif
-#include <ulogd/ulogd.h>
 #include <sys/param.h>
 #include <time.h>
 #include <errno.h>
src/ulogd.c +1 -0
index 917ae3a..9004286 100644
@@ -1111,6 +1111,7 @@ static int create_stack(const char *option)
 
 	/* add head of pluginstance stack to list of stacks */
 	llist_add(&stack->stack_list, &ulogd_pi_stacks);
+	ulogd_log(ULOGD_DEBUG, "pluginstance stack created: '%s'\n", option);
 	free(buf);
 	return 0;
 
Signature · 1 line
2.51.0