public override void Log(ExceptionLoggerContext context) { var stringBuilder = new LoggerStringBuilder { Arguments = context.RequestContext.RouteData.Values, ExceptionMessage = context.Exception.Message, Method = context.Request.Method.ToString(), StackTrace = context.Exception.StackTrace, Source = context.Exception.Source, Body = null, URL = context.Request.RequestUri.ToString(), }; var message = stringBuilder.CreateString(); Nlog.Log(LogLevel.Error, message); }