Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 protected void LogInfo(string templateMessage, params object[] propertyValues)
 {
     LogExtensionUtils.LogInfo(this, templateMessage, propertyValues);
 }