Skip to content

Add support for .Destructure.AsScalar(Type scalarType) method in KeyValuePairSettings #1177

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

Closed
tsimbalar opened this issue Jun 13, 2018 · 1 comment · Fixed by #1179
Closed
Assignees

Comments

@tsimbalar
Copy link
Member

tsimbalar commented Jun 13, 2018

based on comments from #1174 (comment)

Ideally, calling
new LoggerConfiguration().Destructure.AsScalar(Type scalarType)
should be supported by ReadFrom.KeyValuePairs() with the format :
"serilog:destructure:AsScalar.scalarType" / "qualified type name".

This means :

  • making the method available even though it is not an extension method (needs a surrogate method with proper extension-method-ish signature)
  • knowing how to handle parameters of type Type when given a qualified type name.

In addition, it would be good to

  • check if a Assembly fully qualified type name (TopNamespace.SubNameSpace.ContainingClass, MyAssembly, Version=1.3.0.0, Culture=neutral, PublicKeyToken=b17a5c561934e089) is required, or if we can do with only a Fully qualified type name (TopNamespace.SubNameSpace.ContainingClass) given that using directives already import an assembly (see also KeyValuePairSettings : support non "assembly-qualified" typenames #1065 ).
  • see how that would translate in the Serilog.Settings.Configuration side of things ...
@tsimbalar
Copy link
Member Author

tested in https://github.com/tsimbalar/serilog-settings-comparison/blob/master/docs/README.md#custom-destructuring

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