Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support from .Destructure.XXX() methods and extension methods in ReadFrom.KeyValuePairSettings #1172

Closed
tsimbalar opened this issue Jun 7, 2018 · 0 comments · Fixed by #1174

Comments

@tsimbalar
Copy link
Member

In order to implement serilog/serilog-settings-appsettings#20 it actually needs to be implemented in the core Serilog repo.

Similar feature is already implemented in Serilog.Settings.Configuration via serilog/serilog-settings-configuration#110 and discussed in serilog/serilog-settings-configuration#106 .

I think that for now, we should keep it simple and just implement support for calling methods and extension methods on Serilog.Configuration.LoggerDestructuringConfiguration but not support the generic overloads, and only support parameter types that are currently supported by the configuration systems (i.e. no Func<> or Action<> so far).

This would also encourage developers of DestructuringPolicys to provide extension methods for a more friendly API and consistency with other configuration parts (Sinks, Enrichers etc).

Defining if and how we support calls to generic methods should probably be done in a separate issue.

tsimbalar added a commit to tsimbalar/serilog that referenced this issue Jun 7, 2018
Supports Serilog "native" non-generic simple  methods : 
- `ToMaximumCollectionCount`
- `ToMaximumDepth`
- `ToMaximumStringLength`

and any *extension method* for `LoggerDestructuringConfiguration`

This should fix serilog#1172
Twinki14 pushed a commit to Twinki14/CitizenFX.Extensions.Client.Serilog that referenced this issue Dec 30, 2023
Supports Serilog "native" non-generic simple  methods : 
- `ToMaximumCollectionCount`
- `ToMaximumDepth`
- `ToMaximumStringLength`

and any *extension method* for `LoggerDestructuringConfiguration`

This should fix serilog#1172
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant