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

Can you allow WriteTo to take a hash as well as an array? #109

Closed
zippy1981 opened this issue May 4, 2018 · 2 comments
Closed

Can you allow WriteTo to take a hash as well as an array? #109

zippy1981 opened this issue May 4, 2018 · 2 comments

Comments

@zippy1981
Copy link

I posted this self answer on stackoverflow last night:

https://stackoverflow.com/questions/50167228/appending-arrays-in-from-appsettings-environment-json-to-appsettings-json

TL;DR; if I want to have one sink in appsettings.json and one in appsettings.development.json I need to use funky array notation syntax. The problem is the two files need to know about the order of arrays. The config files would be much more elegant if WriteTo could take a hash table. Perhaps in that case the Key could be the Extension method to add the sink and the value could be the args array. Of course the sacrifice there is you could not use a sink twice. In many cases that could be considered a feature.

@nblumhardt
Copy link
Member

Thank you for the note 👍

I think this is a duplicate of #49 (which would be really great to make some progress on).

@skomis-mm
Copy link
Contributor

For a reference about how to use custom keys for array items see comment. Discussion about simplifying syntax is in #49 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants