Repository navigation
Use g_info() for --verbose messages - #5219
Merged
Merged
Conversation
TingPing
approved these changes
Dec 14, 2022
This brings us one step closer to being able to stop using the flatpak2 log domain for messages that are exclusive to `flatpak -v -v`. Signed-off-by: Simon McVittie <[email protected]>
This brings us one step closer to being able to stop using the flatpak2 log domain for messages that are exclusive to `flatpak -v -v`. Signed-off-by: Simon McVittie <[email protected]>
Signed-off-by: Simon McVittie <[email protected]>
Now that we are logging `flatpak -v` messages with log level INFO, and printing INFO messages in the same way as DEBUG, we can reserve log level DEBUG for `flatpak -v -v` messages. This means we no longer need a weird secondary debug domain. There is a very small behaviour change here: G_MESSAGES_DEBUG=flatpak is now similar to `flatpak -v -v` (previously `flatpak -v`), and G_MESSAGES_DEBUG=flatpak2 no longer has any effect. This seems more in line with what would be expected from a GLib-based application. In flatpak(1) and the system helper, this does not change behaviour other than that: the same messages are logged by `-v` and by `-v -v` as before. In daemons that do not implement `-v -v` (the OCI authenticator, portal and session helper), it continues to be necessary to use G_MESSAGES_DEBUG to see flatpak_debug2() messages. Signed-off-by: Simon McVittie <[email protected]>
They are now equivalent. Resolves: flatpak#5001 Signed-off-by: Simon McVittie <[email protected]>
smcv
force-pushed
the
g-info-everywhere
branch
from
December 14, 2022 20:03
31ed709 to
fc52652
Compare
Collaborator
Author
|
Rebased after #5218 was merged, no further changes. I'll land this when CI has passed. |
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.
Implements #5001.
common: Use g_info() for messages that will be shown by flatpak -v
This brings us one step closer to being able to stop using the flatpak2
log domain for messages that are exclusive to
flatpak -v -v.app: Use g_info() for messages that will be shown by flatpak -v
This brings us one step closer to being able to stop using the flatpak2
log domain for messages that are exclusive to
flatpak -v -v.daemons, etc.: Use g_info() for messages that are enabled by -v
common: Make flatpak_debug2() use the same domain as g_debug()
Now that we are logging
flatpak -vmessages with log level INFO,and printing INFO messages in the same way as DEBUG, we can reserve
log level DEBUG for
flatpak -v -vmessages. This means we no longerneed a weird secondary debug domain.
There is a very small behaviour change here: G_MESSAGES_DEBUG=flatpak
is now similar to
flatpak -v -v(previouslyflatpak -v), andG_MESSAGES_DEBUG=flatpak2 no longer has any effect. This seems more in
line with what would be expected from a GLib-based application.
In flatpak(1) and the system helper, this does not change behaviour
other than that: the same messages are logged by
-vand by-v -vas before.
In daemons that do not implement
-v -v(the OCI authenticator, portaland session helper), it continues to be necessary to use
G_MESSAGES_DEBUG to see flatpak_debug2() messages.
common: Replace all flatpak_debug2() with g_debug()
They are now equivalent.
Resolves: [Feature request]: Switch to g_info() for --verbose messages #5001