Logging Patterns
This chapter delves into logging, an integral feature of .NET, and concludes the Designing for ASP.NET Core section. Logging is a fundamental building block for applications, allowing us to capture valuable information during runtime, and ASP.NET Core conveniently provides built-in support for it. In this chapter, we will explore the logging framework provided by ASP.NET Core and learn how to implement it effectively in our applications.
Logging is essential and adds visibility to production systems. Without logs, you don’t know what is happening in your system unless you are the only one using it, which is very unlikely. ASP.NET Core offers a logging system with clean interfaces, eliminating the need for third-party libraries and presenting a flexible and robust approach to integrating logging into our applications. Like many other systems, the logging system is provider-based, allowing us to add and configure the logging providers that suit our needs...