mirror of
https://github.com/flatpak/flatpak.git
synced 2026-05-18 13:52:53 -04:00
main: Treat g_info() as equivalent to g_debug()
This makes us consistent with the default behaviour of GLib, and its behaviour with G_MESSAGES_DEBUG=all. g_debug() and g_info() are the two lowest priority levels, and GLib normally silences them by default. At the moment, Flatpak uses G_LOG_LEVEL_DEBUG in the flatpak2 domain as its lowest-priority log level (only shown with flatpak -v -v), and G_LOG_LEVEL_DEBUG in the flatpak domain as its second-lowest (shown with flatpak -v or higher). I want to move towards using G_LOG_LEVEL_INFO for flatpak -v messages, and G_LOG_LEVEL_DEBUG for flapak -v -v, so that we don't need a second log domain: this is a policy I've used successfully in Flatpak-derived Steam Runtime code. This change does not fully implement that policy, but gives us a migration path towards it, by allowing us to start using g_info() for flatpak -v messages. Helps: https://github.com/flatpak/flatpak/issues/5001 Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
committed by
Simon McVittie
parent
87c9fccdb2
commit
ac4e322629
@@ -358,12 +358,12 @@ flatpak_option_context_parse (GOptionContext *context,
|
||||
else
|
||||
{
|
||||
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 (opt_verbose > 0 || opt_ostree_verbose)
|
||||
flatpak_disable_fancy_output ();
|
||||
|
||||
Reference in New Issue
Block a user