Beispiel #1
0
        public override void OnActionExecuting(ActionExecutingContext context)
        {
            var userName   = context.HttpContext.User.Identity.Name ?? "Anonymous";
            var actionName = (context.ActionDescriptor as ControllerActionDescriptor)?.ActionName ?? context.ActionDescriptor.DisplayName;

            _activityLogger.Log(_logger, userName, actionName, $"User {userName} executing action {actionName}");
        }