Skip to content
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

Allow suppressing GTK log messages #22424

Closed
wants to merge 4 commits into from
Closed

Conversation

vadz
Copy link
Contributor

@vadz vadz commented May 11, 2022

See #22176 for the motivation.

This will probably be used for other messages in the future.

vadz added 4 commits May 12, 2022 00:25
Refactor the code to separate setting of the log callback from the
filtering decision.

Right now the only existing filter is the one just checking the log
level, which is used by GTKSuppressDiagnostics(), but this will allow
adding other filters in the upcoming commits.
This will allow suppressing GTK log messages with the specified
fixed contents.
These messages are due to an assertion failure deep inside ATK which
doesn't indicate any real problem (as failure to get the label of an
already destroyed tab is normal and is already handled correctly in the
GTK code) and can't be avoided, so suppress them to avoid showing them
to the users who can't do anything at all about them anyhow, but can be
scared by the "CRITICAL" GTK messages.

Closes wxWidgets#22176.
In the future it might be useful to run the code with WXTRACE=gtklog to
see if any GTK log messages we're filtering don't need to be filtered
any longer.
@vadz vadz added the GTK label May 11, 2022
@vadz vadz requested a review from paulcor May 11, 2022 22:37
@vadz
Copy link
Contributor Author

vadz commented May 15, 2022

@paulcor Please let me know if I should wait for your review. Otherwise I'll merge this soon.

vadz added a commit that referenced this pull request May 17, 2022
Allow suppressing GTK log messages.

See #22424.
@vadz
Copy link
Contributor Author

vadz commented May 17, 2022

Merged by the commit above.

@vadz vadz closed this May 17, 2022
@vadz vadz deleted the gtk-log-suppress branch May 17, 2022 14:51
vadz added a commit to vadz/wxWidgets that referenced this pull request May 18, 2022
This was recently broken by bffcb88 (Optionally detect not filtered
GTK log messages, 2022-05-12), see wxWidgets#22424.

Fix it by providing a trivial "do nothing" version of LogFilterByMessage
even if we can't implement it -- this seems to be preferable to using
preprocessor checks in the code using it.

Closes wxWidgets#22434.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants