Skip to content

Instantly share code, notes, and snippets.

@guntidheerajkumar
Last active November 6, 2015 06:04
Show Gist options
  • Save guntidheerajkumar/d1ba7357927c9824450f to your computer and use it in GitHub Desktop.
Save guntidheerajkumar/d1ba7357927c9824450f to your computer and use it in GitHub Desktop.
public override void OnActionExecuting(ActionExecutingContext filterContext)
{
// Retrieve the information what we need to log
string routeInfo = GetRouteData(filterContext.RouteData);
string user = filterContext.HttpContext.User.Identity.Name;
Debug.WriteLine(String.Format("ActionExecuting - {0} ActionType: {1}; User:{2}"
, routeInfo, ActionType, user), "Audit Log");
base.OnActionExecuting(filterContext);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment