You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Feature request]: Switch to g_info() for --verbose messages #5001
I agree to follow the Code of Conduct that this project adheres to.
I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Suggestion
At the moment, Flatpak has this output:
normally: GLib's implicit default, G_LOG_LEVEL_MESSAGE and up (from any domain)
with --verbose: G_LOG_LEVEL_DEBUG and up for the flatpak domain
with -v -v: G_LOG_LEVEL_DEBUG and up, both for the flatpak domain and a separate flatpak2 domain
This can result in reviewers not wanting some g_debug() messages to be emitted, because they are too verbose and would be confusing to users of flatpak -v. But having a separate flatpak2 domain for extra-verbose messages is also odd, and will cause those messages to be skipped if you run with G_MESSAGES_DEBUG=flatpak, which is unlikely to be what anyone expected.
In steam-runtime-tools, which recycles quite a lot of Flatpak code, I've had good results from this setup:
normally: GLib's implicit default, G_LOG_LEVEL_MESSAGE and up (from any domain)
with --verbose: G_LOG_LEVEL_INFO and up
with my project's equivalent of -v -v: G_LOG_LEVEL_DEBUG and up
G_MESSAGES_DEBUG also activates both G_LOG_LEVEL_INFO and G_LOG_LEVEL_DEBUG messages from the selected domains. I think that makes this a good pattern to encourage in any GLib-based software.
Does that sound like a reasonable model for Flatpak? If yes, the way to get there would be:
change all g_debug() to g_info()
change all flatpak_debug2() to g_debug(), and remove flatpak_debug2()
optionally review the debug messages and check whether any are at the wrong level
Activity
mwleeds commentedon Jul 22, 2022
SGTM but it looks like Alex is the one who added the flatpak2 domain: aec35fd
main: Treat g_info() as equivalent to g_debug()
common: Replace all flatpak_debug2() with g_debug()
main: Treat g_info() as equivalent to g_debug()
main: Treat g_info() as equivalent to g_debug()
common: Replace all flatpak_debug2() with g_debug()
common: Replace all flatpak_debug2() with g_debug()
main: Treat g_info() as equivalent to g_debug()
gs-debug: Log g_message() but not g_info() logs to the journal