-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
ASP.NET Core 9 Web API Cookbook
By :
In this recipe, we’ll enhance BooksController with advanced structured logging techniques using Serilog. We will start with a standard ILogger interface, and leverage Serilog’s powerful structured logging capabilities to craft detailed, easily queryable log objects. This allows us to capture, query, and analyze complex log data that would be very difficult to manage with traditional string-based logging. We will use LogContext to add a consistent scope-wide property to our log. We will also query our log in Seq, using the properties of our structured log objects.
The starting project for this recipe can be found here: https://github.com/PacktPublishing/ASP.NET-9-Web-API-Cookbook/tree/main/start/chapter05/CraftingDetailedLogObjects.
We will be using Seq to query our log. Please make sure Seq is set up in a Docker container as per the Technical requirements section at the beginning of this chapter...