public MvcLogEventFixtures() { _context = ObjectMother.CreateActionActionExecutedContextFake(); _expectedUrl = _context.RequestContext.HttpContext.Request.RawUrl; _expectedControllerName = _context.ActionDescriptor.ControllerDescriptor.ControllerName; _expectedActionName = _context.ActionDescriptor.ActionName; _sut = new MvcLogEvent(_context); }
public override void OnActionExecuted(ActionExecutedContext context) { if (!Enabled) return; var logEvent = new MvcLogEvent(context); var log = LogManager.GetLogger(context.Controller.GetType()); if (logEvent.IsHttpGet) { log.Debug(logEvent); } else { log.Info(logEvent); } base.OnActionExecuted(context); }
public override void OnActionExecuted(ActionExecutedContext context) { if (!Enabled) { return; } var logEvent = new MvcLogEvent(context); var log = LogManager.GetLogger(context.Controller.GetType()); if (logEvent.IsHttpGet) { log.Debug(logEvent); } else { log.Info(logEvent); } base.OnActionExecuted(context); }