serilog / serilog-settings-configuration

A Serilog configuration provider that reads from Microsoft.Extensions.Configuration
Apache License 2.0
444 stars 129 forks source link

Configure JsonFormatter parameters via appsettings.json #392

Closed johannesmols closed 1 year ago

johannesmols commented 1 year ago

PR #281 added support for constructor parameters in appsettings.json. However, attempting to do this with the JsonFormatter gives an InvalidOperationException as described by @WattsC-90 here. It seems that there a few that have the same issue, and I do too now. Since the PR is merged, I am opening a new issue to get attention to this.

FaroukOyekunle commented 1 year ago

Where you able to complete the solution to this issues @johannesmols.

johannesmols commented 1 year ago

Hi @FaroukOyekunle, I forgot all about this one. The newest comment on the linked issue actually resolves it in my case: https://github.com/serilog/serilog-settings-configuration/pull/281#issuecomment-1684277040. I was also missing the "Serilog" behind the type of the formatter.

FaroukOyekunle commented 1 year ago

Cool! That's right.