-
Notifications
You must be signed in to change notification settings - Fork 129
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
Support of constructor parameters #188
Conversation
Thanks! Short on time but will try to loop back around. What was the situation in which you found yourself needing this? (I've seen several 👍) |
In my case I use |
@nblumhardt , what's the status on this? I just stumbled upon this problem today when introducing file logging in one of our solutions, and realizing I needed to set the Would be really useful to have first-class support for configuring complex/abstract instances with parameters in config files. |
@julealgon for now, you might want to use a workaround such as the one described in or follow indications in https://github.com/tsimbalar/serilog-settings-comparison/blob/master/docs/README.md#interfaces-and-abstract-classes , and make a
|
Hello @tsimbalar. How's this solving the problem where there is a need to configure a TextFormatter with constructor arguments (non-parameterless constructor)? |
@tzographos you're right, there is nothing about this in serilog/serilog-sinks-console#28 ... no idea what I meant back then 🤔 |
Hi @vhatsura , Are you still interested to work on this? I made a workable sketch for a complete solution, but first would like to know your opinion if you still interested. |
Ok, I've just created the new one with additional features. Feel free to comment/review :) |
related to #167
Hey, guys! It's an early draft pull request with implementation of possiblity to create object via constructors with parameters. I will be appreciate if you can take a look and add your feedback