Skip to content

Commit

Permalink
daemons: Treat g_info() as equivalent to g_debug()
Browse files Browse the repository at this point in the history
Same as the previous commit, but for anything that runs in the
background.

Signed-off-by: Simon McVittie <[email protected]>
(cherry picked from commit ea584ac)
  • Loading branch information
smcv committed Jan 30, 2023
1 parent b6122f6 commit 7975b93
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions oci-authenticator/flatpak-oci-authenticator.c
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ message_handler (const gchar *log_domain,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("F: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
Expand Down Expand Up @@ -765,7 +765,7 @@ main (int argc,
}

if (opt_verbose)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

g_debug ("Started flatpak-authenticator");

Expand Down
4 changes: 2 additions & 2 deletions portal/flatpak-portal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,7 @@ message_handler (const gchar *log_domain,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("F: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
Expand Down Expand Up @@ -3037,7 +3037,7 @@ main (int argc,
}

if (opt_verbose)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

client_pid_data_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) pid_data_free);

Expand Down
4 changes: 2 additions & 2 deletions session-helper/flatpak-session-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ message_handler (const gchar *log_domain,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("F: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
Expand Down Expand Up @@ -826,7 +826,7 @@ main (int argc,
}

if (verbose)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

client_pid_data_hash = g_hash_table_new_full (NULL, NULL, NULL, (GDestroyNotify) pid_data_free);

Expand Down
8 changes: 4 additions & 4 deletions system-helper/flatpak-system-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -2289,7 +2289,7 @@ message_handler (const gchar *log_domain,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("FH: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
Expand Down Expand Up @@ -2373,12 +2373,12 @@ main (int argc,
flatpak_disable_fancy_output ();

if (opt_verbose > 0)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);
if (opt_verbose > 1)
g_log_set_handler (G_LOG_DOMAIN "2", G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN "2", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

if (opt_ostree_verbose)
g_log_set_handler ("OSTree", G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler ("OSTree", G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

if (!on_session_bus)
{
Expand Down
4 changes: 2 additions & 2 deletions tests/test-authenticator.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ message_handler (const gchar *log_domain,
gpointer user_data)
{
/* Make this look like normal console output */
if (log_level & G_LOG_LEVEL_DEBUG)
if (log_level & (G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO))
g_printerr ("F: %s\n", message);
else
g_printerr ("%s: %s\n", g_get_prgname (), message);
Expand Down Expand Up @@ -372,7 +372,7 @@ main (int argc,
}

if (opt_verbose)
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG, message_handler, NULL);
g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_DEBUG | G_LOG_LEVEL_INFO, message_handler, NULL);

g_debug ("Started test-authenticator");

Expand Down

0 comments on commit 7975b93

Please sign in to comment.