-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I was surprised to find out that currently log buffering (and their default options) is only enabled when LogBuffering in PowertoolsLoggerConfiguration is not null:
This can be confusing as some would expect that LogBufferingOptions is only used when you want to override some default options (common practice).
For example now if you want to enabled buffering and don't want to override default options - you need to instantiate empty options object (looks a bit weird):
Logger.Configure(options => options.LogBuffering = new LogBufferingOptions());
What other libraries (for example Microsoft) do instead - all Options are instantiated by default and you just override properties instead:
Logger.Configure(options => options.LogBuffering.Enabled = true);
Consider also introducing Enabled property to avoid confusion and NRE's.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status