Open viettd1190 opened 5 years ago
I have the same problem. Do you found the answer?
Long story short, you can't :-/
Serilog.Settings.AppSettings
does not do "complex" object creation.
This Stack Overflow question offers a workaround. In the example, this is a workaround for the JSON
settings, but you can do something similar, and then do this in your config :
<add key="serilog:write-to:EmailCustom.param1" value="Test log from Serilog"/>
<add key="serilog:write-to:EmailCustom.param2" value="Test log from Serilog"/>
How to specify the networkCredential param using xml in Serilog.Sinks.Email. I try below but this cannot working