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

Document that Destructure config does not work in current Nuget release #137

Closed
kevbry opened this issue Oct 3, 2018 · 4 comments · Fixed by #223
Closed

Document that Destructure config does not work in current Nuget release #137

kevbry opened this issue Oct 3, 2018 · 4 comments · Fixed by #223

Comments

@kevbry
Copy link

kevbry commented Oct 3, 2018

Currently, the dev branch is the default branch for this repo. When I visit the project URL listed under the currently released nuget package, I see the readme for the dev branch, which documents features (like Destructure configuration) that aren't actually present in the currently released version of serilog.settings.configuration.

Would it be possible to have a note on the readme in dev to give a hint that certain features are only available in pre-release packages?

@nblumhardt
Copy link
Member

Thanks for the note. I think we're overdue in getting #112 out the door - there wouldn't normally be as much feature-inventory as we currently have.

Were you able to try the current pre-release version? Feedback on how the new features are working for you would be valuable. Thanks!

@kevbry
Copy link
Author

kevbry commented Oct 4, 2018

The latest prerelease seems to work fine. I was able to configure Destructurama using both syntaxes:

      {
        "Name": "With",
        "Args": { "policy": "Destructurama.Attributed.AttributedDestructuringPolicy, Destructurama.Attributed" }
      },

and -

      {
        "Name": "UsingAttributes"
      }

Is there any documentation of the "policy" string format? I guessed right at what I was supposed to be putting in there, but I couldn't find anything describing what the two parts of the comma delimited string actually mean.

@tsimbalar
Copy link
Member

We do have a repo that contains examples of common scenarios, and an example of custom destructuring here :
https://github.com/tsimbalar/serilog-settings-comparison/blob/master/docs/README.md#custom-destructuring .

The general idea is that when a configuration method expects a parameter that is an interface or an abstract class, you can specify the fully qualified type name of an implementation/subclass that has a default constructor.

The format is rather standard, it is the type's "assembly-qualified name", and is the format accepted by Type.GetType().

@kevbry
Copy link
Author

kevbry commented Oct 4, 2018

I did come across that repo while troubleshooting, and it was very helpful. Thanks for putting it together. Sort of the same comment I had earlier is that it wasn't easy to tell that the destructuring config isn't actually valid in the currently released nuget package, and would be good to have a note on the destructuring section for the time being that it's only valid for 3.0+. Also would be good to have a link to it from the readme in this project, as it's a bit hard to find outside of reading through lots of closed issues.

Also thanks for the clarity on the parameter formatting.

I found a lot of great information on how to structure configuration, but quite a bit of it was somewhat difficult to track down as someone new to this library. Things like the "using" block being redundant on Core but not on framework (#122), the various different ways to express subloggers or how to structure sinks so that your base configuration can be overridden with environment variables.
I'd definitely throw a vote in for docFX suggested in serilog/serilog#1164 . For one it'd make it fairly painless to segment docs by version, so issues like I had with destructuring might be a bit easier to avoid, and having a central location might make contribution a bit easier.

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.

3 participants