Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET MVC 4 Web Api: Diagnostic features

I'm searching for a feature to enable loggin/tracing in ASP.NET MVC 4 Web Api. In WCF you can activate logging and WCF writes that it is doing. Then, I can open the dump and search for errors.

I do not want to trace my web api but log that the framework is doing. If i trace/log the web api with message handlers I get no information if an error occures before my implementation.

like image 387
user437899 Avatar asked Jun 21 '12 13:06

user437899


1 Answers

See http://www.asp.net/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api

If you provide an ITraceWriter implementation (which can be as simple as calling System.Diagnostics.Trace), the web API framework will trace what it does.

  • Mike
like image 59
Mike Wasson Avatar answered Sep 28 '22 03:09

Mike Wasson