August 2017
Intermediate to advanced
330 pages
7h 26m
English
One of ASP.NET Core's features is its in-built logging using ILoggerFactory. Right away, when you create an ASP.NET Core application (empty-, MVC-, or web API-based), you will see that the IWebHost's CreateDefaultBuilder method of the program class does the ground-level work for the Logging functionality to work-it reads the appsettings.json file for the logging section to provide all the necessary infrastructure to log information to debug or console window.
The use of Logging is greatly simplified by ILoggerFactory in two parts--AddProvider and CreateLogger.
The AddProvider method takes in ILoggerProvider to write/store the logging information generated by the application. The provider can either be a console, ...
Read now
Unlock full access