Repository navigation
main: Treat g_info() as equivalent to g_debug() - #5218
Merged
Merged
Conversation
This was referenced Dec 14, 2022
TingPing
approved these changes
Dec 14, 2022
TingPing
left a comment
Member
There was a problem hiding this comment.
I want to move towards using G_LOG_LEVEL_INFO for flatpak -v messages, and G_LOG_LEVEL_DEBUG for
flapak -v -v
This sounds good.
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: flatpak#5001 Signed-off-by: Simon McVittie <[email protected]>
Same as the previous commit, but for anything that runs in the background. Signed-off-by: Simon McVittie <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: [Feature request]: Switch to g_info() for --verbose messages #5001
daemons: Treat g_info() as equivalent to g_debug()
Same as the previous commit, but for anything that runs in the
background.
I want this as a starting point for #5001, but I've written this first so that I can already use
G_LOG_LEVEL_INFOin #5213.To test, apply this:
and run
flatpak ps,flatpak ps -v,flatpak ps -v -v. The expected result is thatdebug2only appears with-v -v,infoappears with at least-v, and the status ofdebugis going to change during #5001 but at the moment it appears with at least-v.