Add the following to Global.asax:
void ErrorLog_Filtering(object sender, ExceptionFilterEventArgs args)
{
var httpContext = args.Context as HttpContext;
if (httpContext != null && httpContext.Request.User.Identity.IsAuthenticated)
{
var error = new Error(args.Exception, httpContext);
error.User = "***hidden***";
ErrorLog.GetDefault(httpContext).Log(error);
args.Dismiss();
}
}
Adapted from: http://docs.elmah.io/remove-sensitive-form-data/
EDIT
To answer you other question, the "Code" field should be the HTTP status code: 500, 404, etc.