You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All Add*(...) provider extension methods are now obsolete with replacements on Microsoft.Extensions.Logging.LoggerFactory.
The AddConsoleAddDebug etc. provider extension methods that took a filter or minimum LogLevel are now obsolete
No longer shipping Microsoft.Extensions.Logging.Filter.
First Class Filtering
LoggerFactory now has multiple AddFilter(...) overloads.
Filters use provider names, categories, and log level to filter logs.
There is an AddProvider(string providerName, ILoggerProvider provider) function to add providers with a custom name used for filtering.
Custom provider names are checked first when filtering. then provider full names are checked i.e.
Check Console as the custom name then Microsoft.Extensions.Logging.Console.ConsoleLoggerProvder as the full name.
Obsolete APIs:
Obsoleted
AddProvider
onILoggerFactory
Add*(...)
provider extension methods are now obsolete with replacements onMicrosoft.Extensions.Logging.LoggerFactory
.AddConsole
AddDebug
etc. provider extension methods that took a filter or minimumLogLevel
are now obsoleteNo longer shipping
Microsoft.Extensions.Logging.Filter
.First Class Filtering
LoggerFactory
now has multipleAddFilter(...)
overloads.Filters use provider names, categories, and log level to filter logs.
There is an
AddProvider(string providerName, ILoggerProvider provider)
function to add providers with a custom name used for filtering.Custom provider names are checked first when filtering. then provider full names are checked i.e.
Check
Console
as the custom name thenMicrosoft.Extensions.Logging.Console.ConsoleLoggerProvder
as the full name.Old:
New:
The
AddDebug()
AddConsole()
etc. methods we provide have predefined custom provider names:Configuration
LoggerFactory
's constructor can take anIConfiguration
and will create filters based on the config:The configuration can also be replaced with
UseConfiguration
onLoggerFactory
The Logging system is configured via
IWebHostBuilder.ConfigureLogging
Old:
New:
Please use aspnet/Logging#615 for any discussion.
The text was updated successfully, but these errors were encountered: