Consisting of:
- ILogger<>
- ILoggerProvider
- ILoggerFactory
- ILoggingBuilder
Useful for
- Developers only needing to really learn one abstraction in and out
- Frameworks neatly plugging into the abstraction (easy to replace frameworks)
Configuration by default when creating an ASP.NET Core page.
- Dependency Injection pattern
- Clean interface
See here on when to use what log level
Update the minimum log levels for particular categories
Snippet for Console logger to show scopes
"Console": {
"IncludeScopes": "true"
}Using the ILogger.BeginScope in the HomeController.Contact action
- Structered Logging
- Implement custom providers
- LoggerMessage pattern
- EventIds