This repository was archived by the owner on Dec 13, 2018. It is now read-only.
This repository was archived by the owner on Dec 13, 2018. It is now read-only.
Configuration and Filtering changes #565
Closed
Description
- Add
void AddProvider(string providerName, ILoggerProvider provider)
toLoggerFactory
-
LoggerFactory(IConfiguration config)
will be the way to add configuration to our factory - Support named providers
- Check
typeof(type).FullName
- Name passed into
AddProvider
wins always
- Check
- Example format:
{
"Logging": { // default values unless otherwise specified
"LogLevel": {
"System": "Trace"
},
"Console": {
"LogLevel": {
"Microsoft.Extensions": "Warning"
}
},
"CustomProvider": { // e.g. factory.AddProvider("CustomProvider", new MyCustomProvider())
"LogLevel": {
"System": "Information"
}
}
}
}
- [ ] Remove ability to call AddProvider
whenever you want, only allowed during startup
- Obsolete
AddConsole(this ILoggerFactory factory, IConfiguration configuration)
Figure this out:
- Obsolete
void AddProvider(ILoggerProvider provider)
onILoggerFactory
Stretch goal:
- Add
AddFilter(string providerName, Func<string, LogLevel, bool> filter)
toLoggerFactory
-
AddFilter
is additive
-