From: Michael Tremer Date: Sat, 27 Sep 2025 11:12:50 +0000 (+0000) Subject: ctx: Create a dummy function to set the log level X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8187d7f3bb9d2bed0cba0690ea1c5bde186ffe5;p=telemetry.git ctx: Create a dummy function to set the log level Signed-off-by: Michael Tremer --- diff --git a/src/daemon/ctx.c b/src/daemon/ctx.c index 8437989..72394e7 100644 --- a/src/daemon/ctx.c +++ b/src/daemon/ctx.c @@ -25,6 +25,11 @@ struct collecty_ctx { int nrefs; + + // Logging + struct { + int level; + } log; }; static void collecty_ctx_free(collecty_ctx* ctx) { @@ -61,3 +66,10 @@ collecty_ctx* collecty_ctx_unref(collecty_ctx* ctx) { collecty_ctx_free(ctx); return NULL; } + +/* + Logging +*/ +void collecty_ctx_set_log_level(collecty_ctx* ctx, int level) { + ctx->log.level = level; +} diff --git a/src/daemon/ctx.h b/src/daemon/ctx.h index 454c996..5dedd7e 100644 --- a/src/daemon/ctx.h +++ b/src/daemon/ctx.h @@ -28,4 +28,7 @@ int collecty_ctx_create(collecty_ctx** ctx); collecty_ctx* collecty_ctx_ref(collecty_ctx* ctx); collecty_ctx* collecty_ctx_unref(collecty_ctx* ctx); +// Logging +void collecty_ctx_set_log_level(collecty_ctx* ctx, int level); + #endif /* COLLECTY_CTX_H */