Excel-DNA / Excel-DNA/ExcelDna

Add support for structured logging for diagnostics

Open
#277 3 comments 0 reactions 0 assignees View on GitHub
enhancement
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.

![image](https://user-images.githubusercontent.com/177608/68549501-fc581a00-03ce-11ea-82bd-6ba998a1c210.png)

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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.