From a1f8ea826e2802b71d96d8343e23cee59ad39003 Mon Sep 17 00:00:00 2001 From: Simon McVittie <smcv@collabora.com> Date: Fri, 29 Nov 2024 17:14:05 +0000 Subject: [PATCH] log: Treat DEBUG_INVOCATION=1 as equivalent to SRT_LOG=debug MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit systemd ≥ 257 sets this if a service with RestartMode=debug is restarted, and suggests that logging code should take it into account. Signed-off-by: Simon McVittie <smcv@collabora.com> --- steam-runtime-tools/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/steam-runtime-tools/log.c b/steam-runtime-tools/log.c index 5252d828c..309d1fda4 100644 --- a/steam-runtime-tools/log.c +++ b/steam-runtime-tools/log.c @@ -699,6 +699,9 @@ _srt_util_set_glib_log_handler (const char *prgname, if (_srt_boolean_environment ("PRESSURE_VESSEL_LOG_WITH_TIMESTAMP", FALSE)) flags |= SRT_LOG_FLAGS_TIMESTAMP; + if (_srt_boolean_environment ("DEBUG_INVOCATION", FALSE)) + flags |= SRT_LOG_FLAGS_DEBUG; + if (_srt_boolean_environment ("PRESSURE_VESSEL_LOG_INFO", FALSE)) flags |= SRT_LOG_FLAGS_INFO; -- GitLab