示例#1
0
            public override void Write(byte[] buffer, int offset, int count)
            {
                //A renderelt html:
                string html = System.Text.Encoding.Default.GetString(buffer);

                SillyLogger.Store(html); //Loggolása
                _shrinkStream.Write(buffer, offset, count);
            }
示例#2
0
        public override void OnResultExecuted(System.Web.Mvc.ResultExecutedContext filterContext)
        {
            ViewResult result = filterContext.Result as ViewResult;

            if (result != null)
            {
                SillyLogger.Store("Használt view neve: " + result.ViewName);
            }

            RazorView razor = result.View as RazorView;

            if (razor != null)
            {
                SillyLogger.Store("Használt view template: " + razor.ViewPath);
            }

            //var response = filterContext.HttpContext.Response;
            //response.Filter = new LogFilter(response.Filter, filterContext.RouteData.Values["action"].ToString());

            SillyLogger.Store(string.Format("{0} action and view processed", filterContext.RouteData.Values["action"]));
        }
示例#3
0
 public override void Flush()
 {
     _shrinkStream.Flush();
     SillyLogger.Store(string.Format("{0} view rendered", _action));
 }
示例#4
0
 public override void OnActionExecuted(System.Web.Mvc.ActionExecutedContext filterContext)
 {
     SillyLogger.ExitMethod(filterContext.RouteData.Values["action"].ToString());
 }
示例#5
0
 public override void OnActionExecuting(System.Web.Mvc.ActionExecutingContext filterContext)
 {
     SillyLogger.EnterMethod(filterContext.ActionDescriptor.ActionName);
 }