Summary

In this chapter, we covered some of the tools and techniques that you can use to make it easier for you and the users of your API, who are developers themselves, to find and diagnose errors in your application.

Logging is one of the most helpful things you have in case of a problem. Often, it is the only way for you to find out what happened when the error occurred. The new logging framework that ASP.NET Core introduced is integrated very nicely with the ASP.NET Core request pipeline, and using it in your application code is straightforward. There are many logging providers that you can use, and I've shown you how you can use Application Insights, which provides a nice search window inside Visual Studio, along with other diagnostic ...

Get Hands-On Full-Stack Web Development with ASP.NET Core now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.