using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Filters;

namespace Quadarax.Foundation.Core.Web.Logging
{
    public class AutoLogAttribute : TypeFilterAttribute
    {
        public AutoLogAttribute() : base(typeof(AutoLogActionFilterImpl))
        {
        }

        private class AutoLogActionFilterImpl : IActionFilter
        {
            public AutoLogActionFilterImpl()
            {
            }

            public void OnActionExecuting(ActionExecutingContext context)
            {
            }

            public void OnActionExecuted(ActionExecutedContext context)
            {
                //this.LogInfo($"RQ[{context.HttpContext.Request.Method}]: {context.HttpContext.Request.Path}"); 
            }
        }
    }
}