public static void WriteLog( string loggerName, string loggerMethodName, string controllerName, string actionName) { var logFormat = "{0}, {1} method for Controller {2}, Action {3} is running..."; Trace.TraceInformation( logFormat, loggerName, loggerMethodName, actionName, controllerName); } }
public override void OnActionExecuting( HttpActionContext actionContext) { var controllerCtx = actionContext.ControllerContext; LoggerUtil.WriteLog( _loggerName, "OnActionExecuting", controllerCtx.ControllerDescriptor.ControllerName, actionContext.ActionDescriptor.ActionName ); }