Customize which plug-in messages are shown or skipped, based on their severity level
Submitted by Raphaël Quinet
Link to original bug (#133093)
Description
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.
Version: git master