Affecto.WebApi.Toolkit.RequestErrorLogger.Log C# (CSharp) Method

Log() public method

public Log ( System.Web.Http.ExceptionHandling.ExceptionLoggerContext context ) : void
context System.Web.Http.ExceptionHandling.ExceptionLoggerContext
return void
        public override void Log(ExceptionLoggerContext context)
        {
            ICorrelation correlation;

            try
            {
                correlation = correlationFactory.Invoke(context.Request);
            }
            catch
            {
                correlation = null;
            }

            string parameters = context.ExceptionContext.ActionContext == null ? null : context.ExceptionContext.ActionContext.ParametersToString();
            logger.LogError(correlation, context.Exception, "Unhandled exception from request: {0}({1})", context.Request, parameters);
        }