Drupal core and the various contributed modules communicates back to the site users using a simple messaging framework that stores all messages into the users session and then outputs them together as $messages in page.tpl.php.
Site owners however do not necessarily like to show all the messages generated by the system. Hacking code to disable the drupal_set_message call is not a recommended approach as you will end up having to maintain a lot of patches just to disable/hide certain messages.
The module Disable Messages does exactly this. It allows site owner to disable specific messages shown to end users. This module gives site administrators a reasonably powerful way to filter out messages shown to the end users.
- Filter out messages that match a full text string exactly.
- Filter out messages that match a regular expression(PCRE).
- Permissions to specifically hide all messages of a given type from any role.
- Disable all filtering for specific users.
- Disable all filtering for specific paths.
- Apply filtering only for specific paths.
- Debug system to get messages in the HTML without showing it to the end users.