public void OnResultExecuted(ResultExecutedContext context) { _timer.Stop(); var controller = context.Controller as Controller; LogExtensionUtils.LogInfo(controller, "{RequestDirection} {RequestUriPath} {RequestUriQueryData} returned {ResponseStatus} ({ResponseElapsedTime} ms)", "<<", controller.Request.Path.Value, controller.Request.Query, context.HttpContext.Response.StatusCode, _timer.ElapsedMilliseconds); }
public void OnResultExecuting(ResultExecutingContext context) { _timer = new Stopwatch(); _timer.Start(); var controller = context.Controller as Controller; LogExtensionUtils.LogInfo(controller, "{RequestDirection} {RequestUriPath} {RequestUriQueryData}", ">>", controller.Request.Path.Value, controller.Request.Query); }
protected void LogInfo(string templateMessage, params object[] propertyValues) { LogExtensionUtils.LogInfo(this, templateMessage, propertyValues); }