In the previous post we
saw the various Interfaces and Classes provided by Asp.Net Core to support logging, in this post we shall see on how
to enable Console logging in an Asp.Net
Core Web API application.
To enable a specific type of log we need to add the log provider to the startup. To add a provider we need to call the provider's Add extension method under ConfigureLogging in Program.cs. To Add a console log provider we need to add the following to the Program.cs
To enable a specific type of log we need to add the log provider to the startup. To add a provider we need to call the provider's Add extension method under ConfigureLogging in Program.cs. To Add a console log provider we need to add the following to the Program.cs