Building a sample application
As shown in Figure 2.1, our application consists of two REST services and a MySQL database:
Figure 2.1 – Meme service diagram
- Frontend: ASP.NET Core Razor Pages application that serves user requests to upload and download images
- Storage: ASP.NET Core WebAPI application that uses Entity Framework Core to store images in a MySQL database or in memory for local development
We’ll see how to run the full application using Docker later in this chapter. For now, run it locally and explore the basic logging and monitoring features that come with modern .NET.
We’re going to use the Microsoft.Extensions.Logging.ILogger
API throughout this book. ILogger
provides convenient APIs to write structured logs, along with verbosity control and the ability to send logs anywhere.
ASP.NET Core and Entity Framework use ILogger
; all we need to do is configure the logging level for specific categories or...