From: Michael Tremer Date: Sun, 26 Jan 2025 16:26:31 +0000 (+0000) Subject: daemon: Log to the console when in debug mode X-Git-Tag: 0.9.30~368 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7f340299061f64c113f0f8b02c563c040cde05d9;p=pakfire.git daemon: Log to the console when in debug mode Signed-off-by: Michael Tremer --- diff --git a/src/cli/pakfire-daemon.c b/src/cli/pakfire-daemon.c index a02a372c6..9ca414cf1 100644 --- a/src/cli/pakfire-daemon.c +++ b/src/cli/pakfire-daemon.c @@ -23,6 +23,7 @@ #include #include +#include #include "lib/command.h" #include "lib/daemon.h" @@ -45,7 +46,11 @@ static error_t parse(int key, char* arg, struct argp_state* state, void* data) { switch (key) { case OPT_DEBUG: + // Set the log level to DEBUG pakfire_ctx_set_log_level(ctx, LOG_DEBUG); + + // Write logs to the console + pakfire_ctx_set_log_callback(ctx, pakfire_log_stderr, NULL); break; default: