One of the essential aspects of building web services is logging and health checks. Nowadays, it is preferred to have services with a small scope. This kind of approach provides enormous benefits, but it makes it hard for us to verify whether a service behaves in the right way. Logging helps us to track the actions and the information processed by the web service on the other side, the health check mechanisms provide a way to verify that the service is healthy and all the required dependencies are satisfied. The chapter goes through some of the logging parts of ASP.NET Core, and it shows how to implement health checks using the tools provided by the framework.
In this chapter, we will cover the following topics:
- Logging in ASP.NET Core
- Implementing logging
- Implementing logging providers
- Implementing custom logging in tests
- Web service health check ...