-
Notifications
You must be signed in to change notification settings - Fork 132
Description
Right now, when calling ReadFrom.ConfigSection(IConfigurationSection configSection), the ConfigurationReader does not have access to the global IConfiguration object, so it cannot access the configuration out of the given section. That makes it impossible to access, say, the ConnectionStrings ... .
In PR #144 we added a check to throw an exception when calling a config method that expects an IConfiguration from the ReadFrom.ConfigSection overload so that users don't shoot themselves in the foot.
We should probably mark ConfigurationSection(this LoggerSettingsConfiguration settingConfiguration /*, ...*/) methods as obsolete and instead provide new overloads like
ReadFrom.ConfigurationSection(
this LoggerSettingsConfiguration settingConfiguration,
IConfiguration configuration,
string sectionName /*, ...*/)this would store the global IConfiguration object and look for a section with a given name within.
Does that seem to make sense ?
See #143 for more details