-
Notifications
You must be signed in to change notification settings - Fork 4
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
Provide example of Interface/Abstract class with values #1
Comments
Hi Aleksander , It is not supported right now in any of the Some workarounds you can use :
Lines 1 to 9 in 309f034
Lines 1 to 8 in 309f034
or Lines 1 to 19 in 309f034
I hope this helps ! |
Bummer. Thanks for this info though :) |
I don't know if that's a common enough scenario to ask for the creation of some public static ITextFormatter WithRenderedMessage {get;} = new JsonFormatter(renderMessage: true); which would allow to use it directly in the settings providers with something like : <?xml version="1.0" encoding="utf-8"?>
<configuration>
<appSettings>
<add key="serilog:write-to:DummyWithFormatter.formatter" value="Serilog.Formatting.Json.JsonFormatter::WithRenderedMessage, Serilog" />
</appSettings>
</configuration> @nblumhardt : would that make sense, or would that just add noise in the core repo ? |
@tsimbalar Or provide a way to use constructors. "formatter": {
"@type": "Serilog.Formatting.Json.JsonFormatter",
"renderMessage": true
} This is basically the logic already used to allow doing |
I'm trying to translate the following to config:
I came across this repo, and I imagine I can figure out how to do this, but it would be great if there was an example of this kind of value ready.
The text was updated successfully, but these errors were encountered: