log: Make G_MESSAGES_DEBUG=something work out of the box

calls wouldn't match the glib docs as setting `G_MESSAGES_DEBUG`
also required to pass `-vvv` for things to work. Enable debug logs
as soon as that variable is set.

Closes: https://gitlab.gnome.org/GNOME/calls/-/issues/720
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Part-of: <https://gitlab.gnome.org/GNOME/calls/-/merge_requests/800>
This commit is contained in:
Guido Günther
2025-10-20 13:10:34 +02:00
parent f98f2871de
commit 50b34aec53

View File

@@ -176,21 +176,21 @@ calls_log_handler (GLogLevelFlags log_level,
/* If domain is “all” show logs upto debug regardless of the verbosity */
switch ((int) log_level) {
case G_LOG_LEVEL_MESSAGE:
if (any_domain && domains)
if (any_domain || domains)
break;
if (verbosity < 1)
return G_LOG_WRITER_HANDLED;
break;
case G_LOG_LEVEL_INFO:
if (any_domain && domains)
if (any_domain || domains)
break;
if (verbosity < 2)
return G_LOG_WRITER_HANDLED;
break;
case G_LOG_LEVEL_DEBUG:
if (any_domain && domains)
if (any_domain || domains)
break;
if (verbosity < 3)
return G_LOG_WRITER_HANDLED;