In line with the ServiceStack documentation, we have a global service exception handler. The docs say that this handler should log the exception then call DtoUtils.HandleException
, like this:
private object LogServiceException(object request, Exception exception)
{
var message = string.Format("Here we make a custom message...");
_logger.Error(message, exception);
return DtoUtils.HandleException(this, request, exception);
}
This results in the error being logged twice, since DTOUtils.HandleException
also logs it, in a less customised format. Yes, I much prefer this to the DTOUtils logging and don't want to just use that.
How do we turn off DTOUtils
logging while retaining the rest of the functionality? Nobody likes getting twice as many error emails as they should.