Esempio n. 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);
            }
Esempio n. 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"]));
        }
Esempio n. 3
0
 public override void Flush()
 {
     _shrinkStream.Flush();
     SillyLogger.Store(string.Format("{0} view rendered", _action));
 }
Esempio n. 4
0
 public override void OnActionExecuted(System.Web.Mvc.ActionExecutedContext filterContext)
 {
     SillyLogger.ExitMethod(filterContext.RouteData.Values["action"].ToString());
 }
Esempio n. 5
0
 public override void OnActionExecuting(System.Web.Mvc.ActionExecutingContext filterContext)
 {
     SillyLogger.EnterMethod(filterContext.ActionDescriptor.ActionName);
 }