You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ExceptionLoggerAttribute.cs 390B

123456789101112131415
  1. using System;
  2. using System.Web.Http.Filters;
  3. using iiie.Logs.DataAccess;
  4. namespace iiie.WebApiUtils.BusinessManager
  5. {
  6. [AttributeUsage(AttributeTargets.Method)]
  7. public class ExceptionLoggerAttribute : ExceptionFilterAttribute
  8. {
  9. public override void OnException(HttpActionExecutedContext context)
  10. {
  11. Logger.Log(context.Exception);
  12. }
  13. }
  14. }