-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define log domain #81
Conversation
I was dreaming of this, it would highly decrease the debugging time. The thing preventing me from doing that is that we have to do it in every single project. I'm wondering if the debug domain is the right one, we are using RDNN everywhere so I wonder why not here 🤷♂️ |
One argument is that these names are included in the logs themselves. Having them long makes for harder to read logs. It requires wider windows to read without word wrapping. Example of logs when I start wingpanel with
You see a mix of:
I'm not sure what the correct RDNN is here, I see two different ones:
But that would create logs with prefixes like:
I do understand that RDNN will make it more scalable & future proof. Especially when retrieving logs from the whole OS. Update: It's probably also more discoverability. |
I'd even prefer using https://gitlab.gnome.org/GNOME/vala/issues/765 once it is solved |
Closing due to Corentin's comments |
I'm afraid I'm seeing very little progress on the Gnome / Vala side of things. I'm totally open for switching to RDNN. |
@peteruithoven Converting to draft as there are conflicts and no recent activity. Has anything changed since this was last touched? Is it still needed? |
I mean... again no activity in that gnome solution and I think this is still as relevant. Reading logs from indicators is still very hard. |
OK, if you fix the conflicts I'll look at it - it doesn't appear to do anything irreversible so I am not sure what the harm in merging it while waiting for a better solution is. |
I've fixed the merge requests. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM and works as expected.
Thanks for the review! |
This enables filtering log messages using
G_MESSAGES_DEBUG
, to do do something like the following to only get the logs from a specific indicator and the wingpanel.More info: https://developer.gnome.org/glib/stable/glib-Message-Logging.html#log-domains
Using add_project_arguments instead of add_global_arguments seems to make more sense for log domains, making sure logs from subprojects aren't included.
This is a bit of a test. If we like this I'd like to add these log domains to all indicators and plugs. Maybe even Gala plugins, Applications menu plugins.