private static void HandleExceptioin(Exception ex, SkExceptionHandleAction action) { //No action if (action == SkExceptionHandleAction.None) { return; } //log exception if (action == SkExceptionHandleAction.LogAndRethrow) { var logger = SkServiceLocator.Get <SkLoggerBase>(); if (logger != null) { logger.LogError(ex); } } // throw current exception if (action == SkExceptionHandleAction.Rethrow || action == SkExceptionHandleAction.LogAndRethrow) { throw ex; } }
public override void OnActionExecuted(HttpActionExecutedContext actionExecutedContext) { var logger = SkServiceLocator.Get <SkLoggerBase>(); logger.LogAudit(_eventName, _detail, _properties); }