Excel-DNA / Excel-DNA/ExcelDna
Add support for structured logging for diagnostics
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Excel-DNA's [Diagnostic Logging](https://github.com/Excel-DNA/ExcelDna/wiki/Diagnostic-Logging) feature allows the developer to configure a `TraceListener` that will be used by Excel-DNA to write diagnostic log messages, which can then be forwarded to any logging pipeline such as [Serilog](https://serilog.net) or [NLog](https://github.com/NLog/NLog), for example, in order to consume / analyse these logs outside of the user's machine.
Unfortunately, the standard `Trace` feature that comes with .NET only does simple text logging and does not provide [structured logging](https://nblumhardt.com/2016/06/structured-logging-concepts-in-net-series-1/) capabilities, and important information is lost by the time messages reach the logging pipeline.

It would be great if Excel-DNA moved away from `Trace` and added support for structured logging within its diagnostic logging, and provided an extension point for the developer to attach structured logging providers at run-time.
Ideally it should use [Microsoft.Extensions.Logging](https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.logging?view=dotnet-plat-ext-3.0) which is the current standard for modern .NET apps.
Contributor guide
Assessment
This issue has not been assessed yet.