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 factorySupport named providers- Check
typeof(type).FullName
- Name passed into
AddProvider
wins always
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
Metadata
Metadata
Assignees
Type
Projects
Relationships
Development
No branches or pull requests
Activity
cwe1ss commentedon Mar 22, 2017
Will you react to changes in the underlying configuration system?
My desired scenario: Configuration is loaded from an external system like Consul. I want to be able to change the logging configuration in-flight without having to restart the application.
BrennanConroy commentedon Mar 22, 2017
Yeah, we will handle config changes at runtime.