serilog / serilog-extensions-logging

Serilog provider for Microsoft.Extensions.Logging
Apache License 2.0
307 stars 97 forks source link

Resolves #164 - suppress exceptions from FormattedLogValues #167

Closed nblumhardt closed 4 years ago

nblumhardt commented 4 years ago

CC @gkinsman

gkinsman commented 4 years ago

Looks good! I think it makes sense to fail silently into SelfLog and not attempt to write the log message with parameter holes. Would asserting on SelfLog having no output be a useful test for library authors to catch these bad events?

nblumhardt commented 4 years ago

Thanks for taking a look. Asserting on the absence of SelfLog output, or on the presence of the expected events, would do the job; I'm not sure if Microsoft.Extensions.Logging provides it, but at least for Serilog, the SerilogAnalyzer VS plug-in catches these issues, too.

nblumhardt commented 4 years ago

Thanks, George! Would be great to hear how the -dev package goes, should be on its way through CI -> NuGet now.