How can I prevent 'Error messages' to be shown to anonymous users? Like any Drupal site, my site also shows red notifications from time to time...

The problem is that when these notifications are error messages, they appear at the bottom of the site in a new "Pseudo-reigion"... I use the term "Pseudo-region" because they establish a new "Region" under the site.

It's not really a region but rather a white area with an H1 and some text under it. It is displayed with the word "Error" (as a title, using a &lt;h1&gt; HTML tag), and the text below it is "The website encountered an unexpected error. Please try again later.". This is how it looks like in my site:



So my single aim is to not display these error messages (and this whole "Pseudo region" actually), at least for anonymous users, since it's uglyfies my site.

I've tried to use the following CSS syntax but with no success:

body.not-logged-in div.messages.error {display: none !important;}


This "error" pseudo-region is extremely problematic since it appears even in cases when I hide the notifications themselves via the "Disable messages" module.

I'm sure this error is native to Drupal but I've already tried everything I know to remove it, so any help is appreciated.

An important note

It's a long story why, but disabling the errors through /admin/config/development/logging doesn't help in this case. I'm looking for a solution which is either CSS, a Javascript (not jQuery) tweaking of the css by the text itself, or, some change in the Drupal PHP code that will prevent to program of printing this error.
Like @Screenack suggested.


Navigate to /admin/config/development/logging 
Set the radio to None
Select Save Configuration


Please note that I recommend keeping the errors on locally and trying to fix them.