c# - Serilog.Extras.AppSettings and complex objects -


i'm using serilog.extras.appsetting package, configure serilog. i'm attempting use email sink (serilog.sinks.email), can't figure out how configure network credentials property via appsetting.

    <add key="serilog:using" value="serilog.sinks.email" />     <add key="serilog:write-to:email.mailserver" value="localhost" />     <add key="serilog:write-to:email.fromemail" value="test@google.com" />     <add key="serilog:write-to:email.toemail" value="test@google.com" />     <add key="serilog:write-to:email.restrictedtominimumlevel " value="error" />  <add key="serilog:write-to:email.networkcredential" value="???" /> 

how can specify/represent networkcredential object using appsettings? possible, or limitation of appsetting approach configuration in serilog?

there isn't nice way this, unfortunately.

where has popped in past we've added overloads simple parameters - raising bug or pr effect welcome.

otherwise, reading values out of appsettings manually , configuring sink in code best bet.


Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -