Logging in ASP.NET Core 3.1 Using NLog
NLog NLog is an open source logging framework that provides a great flexibility and configurable options to log the insights of your application. It allows to select multiple targets like database, files, console, etc. at the same time so that user don’t have to maintain different configurations in code. This is the most widely used logging framework out there. For more details : https://nlog-project.org/ It is easy to implement in your Asp.Net core application. We'll see step by step with image. 1. Open Visual Studio and Create new project 2. Choose ASP.Net Core Web Application 3. Enter Name of project 4. Choose Web Application 5. Right Click on your project name and choose Manage Nudget packages. Search these two nudget packages and install. 1. NLog.Config 2. NLog.Web.AspNetCore 6. Open Nlog.config file and paste the code. <?xml version= "1.0" encoding= "utf-8" ?> < nlog