April 2017
Intermediate to advanced
564 pages
24h 7m
English
Logging is a built-in module in .NET Core. Logging can simply be enabled by requesting the ILoggerFactory or ILogger<T> through dependency injection. When using ILoggerFactory, the category name has to be defined, whereas, with ILogger<T>, the class type name will be used as the category name.
The default provider is AddConsole, which logs the message on the console application. However, new providers can also be implemented and added by calling the AddProvider method of ILoggerFactory.
This screenshot shows the final structure of the business layer:

Read now
Unlock full access