I am using Elmah.MVC 2 with MVC3, ASP.NET 4.5 on Azure Websites.
I have set it up to log, via the web.config, to XML files on the webserver. This all works. However
Just remove the <errorLog>
elements from your <elmah>
section. Or comment it out. This will disable the logging functionality, and all you have to do to restore functionality when you want it is add those <errorLog>
elements back in again. This way, you don't have to remove any of the core Elmah components that could lead to problems later on when you want to restore functionality, particularly if you miss something.
Just to note - removing <errorLog>
from <elmah>
in web.config does not stop the logging, it just reverts it to in-memory logging as described in this SO answer. (cannot comment on the accepted answer due to insufficient rep.)
If the intent is to stop logging entirely, you can use the Elmah's ErrorFilterModule
(assuming that it is added in web.config) for that, like so (global.asax.cs excerpt):
protected void ErrorMail_Filtering(object sender, ExceptionFilterEventArgs e)
{
e.Dismiss();
}