GNOME Bugzilla – Bug 133093
Customize which plug-in messages are shown or skipped, based on their severity level
Last modified: 2018-05-24 10:58:47 UTC
As discussed in bug #131975, it would be interesting to provide a new API allowing the plug-ins to assign different severity levels to the messages they want to display. The user would then be allowed to set a threshold for the severity of the messages that should be displayed or ignored. Currently, most plug-ins use g_message(), g_warning() or g_error(). The tiff plug-ins uses also g_logv(). I am not sure about what the best solution would be. Maybe we could have more than 3 severity levels, for example by introducing a difference between minor and major warnings (this could be helpful for the tiff plug-in). Or we could keep 3 severity levels (messages, warnings, errors) and even keep the existing API, but set a handler for these messages that allows some of them to be skipped based on their severity level on a per plug-in basis. It would then be possible for the user to select all messages from the jpeg plug-in, but skip the warnings from the tiff plug-in. This could be done by checking if a threshold has been set for a plug-in when that plug-in starts.
Please note that g_message(), g_warning() and g_error() are used completely different and do not implement three levels of severity. g_message() is currently the only way to report run-time errors/warnings/messages. g_warning() must only be used for debugging output in case of a programming error. It should be used in places where assumptions about the code are being made. If such an assumption is not met, if the code is used in a way that was not foreseen, g_warning() should output information useful to debug the problem. These messages should usually never happen and they are not supposed to be displayed to the user or even translated. g_error() should not be used at all. It immidiately terminates the plug-in and it is better to use g_warning() followed by gimp_quit().
*** Bug 137274 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/61.