NLog Example with .NET 5 This is based on the article Configure NLog in ASP.NET Core Check the Index.cshtml.cs class to see the logger