Make the configuration API more discoverable and usable
tsimbalar opened this issue · comments
Currently, all the configuration is done through static
properties on the ApplicationLifecycleModule
class.
This approach has several drawbacks :
- the naming makes it hard to figure out that this configuration class has anything to do with SerilogWeb, and makes it possibly hard for new-comers to a code base to establish any relationship with SerilogWeb
- the usage of some of the properties is counter intuitive and requires knowledge of the internals (like knowing that
FilterPasswordsInFormData
makes sense only ifFormData
is enabled
The current solution to those issues is the documentation (in the README or in the Intellisense), but it would be great if it could be more discoverable and prevented the user from applying settings that do not make sense.
I would like to propose a new configuration API that tries to fix those issues.
Because it is a big change, the previous API should remain available at least until the next major version (but be marked as Obsolete
).