public override void Log(ExceptionLoggerContext context) { var contextData = new ContextData(); contextData.MarkAsUnhandledError(); contextData.SetSubmissionMethod("ExceptionLogger"); contextData.Add("HttpActionContext", context.ExceptionContext.ActionContext); context.Exception.ToExceptionless(contextData).Submit(); }
public virtual void LogCore(ExceptionLoggerContext context) { }
/// <summary> /// Logs exceptions that are not handled. /// </summary> /// <param name="context"></param> public override void Log(ExceptionLoggerContext context) { Trace.TraceError(context.ExceptionContext.Exception.ToString()); }
public override void Log(ExceptionLoggerContext context) { Its.Log.Instrumentation.Log.Write(() => context.ExceptionContext.Exception.ToString()); }
public override void Log(ExceptionLoggerContext context) { _logger.LogError("WebApiExceptionLogger", context.ExceptionContext.Exception); base.Log(context); }
public Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { _log.Error(context.Exception, "Unhandled exception!"); return(Task.FromResult <object>(null)); }
/// <inheritdoc /> public override bool ShouldLog(ExceptionLoggerContext context) { return(context?.Exception != null); }
public override void Log(ExceptionLoggerContext context) { _log.Error("Unhandled exception", context.Exception); }
public override void Log(ExceptionLoggerContext context) { var xxx = context.Request; Trace.TraceError(context.ExceptionContext.Exception.ToString()); }
public override void Log(ExceptionLoggerContext context) { NewRelic.Api.Agent.NewRelic.NoticeError(context.ExceptionContext.Exception); }
public override bool ShouldLog(ExceptionLoggerContext context) { var x = context.Exception; return(x != null && !(x is TaskCanceledException) && !(x is ObjectNotFoundException)); }
public override void Log(ExceptionLoggerContext context) { _logger.WriteError(context.Exception, "Internal server error:"); }
public override void Log(ExceptionLoggerContext context) { Serilog.Log.Logger.Error(context.Exception, "HTTP {Method} {RawUrl} responded {StatusCode}.", context.Request.Method, context.Request.RequestUri.AbsolutePath, "500"); }
private string GetActionName(ExceptionLoggerContext context) { return(((System.Web.Http.Controllers.ReflectedHttpActionDescriptor)((System.Web.Http.Controllers.HttpActionDescriptor[])context.ExceptionContext.ControllerContext.RouteData.Route.DataTokens["actions"])[0]).ActionName); }
public override void Log(ExceptionLoggerContext context) { var log = context.Exception.ToString(); logger.Error(log); }
public Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { Log.Error(context.Exception, context.ExceptionContext.Request.RequestUri.ToString()); return(Task.CompletedTask); }
public Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { ExceptionHandler.Invoke(this, context.Exception); return(Task.FromResult(0)); }
/// <inheritdoc /> public override void Log(ExceptionLoggerContext context) { var contextWrapper = new ExceptionLoggerContextWrapper(context); _logger.Log(context.Exception, contextWrapper); }
public override void Log(ExceptionLoggerContext context) { Trace.WriteLine(context.Exception.ToString()); }
/// <inheritdoc /> public override Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { var contextWrapper = new ExceptionLoggerContextWrapper(context); return(_logger.LogAsync(context.Exception, contextWrapper, cancellationToken)); }
public Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { Logger.ErrorException("Unhandled exception", context.Exception); return(Task.FromResult <object>(null)); }
public override void Log(ExceptionLoggerContext context) { Nlog.Log(LogLevel.Error, context.Exception, RequestToString(context.Request)); }
public override bool ShouldLog(ExceptionLoggerContext context) { return(true); }
public override Task LogAsync(ExceptionLoggerContext context, CancellationToken cancellationToken) { _logger.LogError("WebApiExceptionLogger", context.ExceptionContext.Exception); return(base.LogAsync(context, cancellationToken)); }
public override void Log(ExceptionLoggerContext context) { string messsage = "全局异常捕获 Url:" + context.Request.RequestUri.ToString(); logger.Error(context.Exception, messsage); }
public override void Log(ExceptionLoggerContext context) { string loggerName = context.Exception.TargetSite != null && context.Exception.TargetSite.DeclaringType != null ? context.Exception.TargetSite.DeclaringType.Name : "NLogExceptionLogger"; Logger.Error().Exception(context.Exception).Message("Unhandled error: {0}", context.Exception.Message).LoggerName(loggerName).Write(); }
public override void Log(ExceptionLoggerContext context) { LoggerHelper.Write(string.Format("Unhandled exception processing " + context.Request.Method + " for " + context.Request.RequestUri + ": " + context.Exception)); }
public virtual Task LogAsyncCore(ExceptionLoggerContext context, CancellationToken cancellationToken) { LogCore(context); return(Task.FromResult(0)); }
public override void Log(ExceptionLoggerContext context) { base.Log(context); }
/// <summary> /// When overridden in a derived class, logs the exception synchronously. /// </summary> /// <param name="context">The exception logger context.</param> public override void Log(ExceptionLoggerContext context) { TraceEntry traceEntry = context.Request?.GetTraceEntry(); this.Logger.Log(2, context.Exception.Message, context.Request, "ASP.NET Error", 0UL, string.Empty, traceEntry, context.Exception); }
public override void Log(ExceptionLoggerContext context) { LogHelper.Error(context.ExceptionContext.ControllerContext.Controller.GetType(), "WebApi Exception", context.Exception); }