Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Logging via NLog in net6

45 views
Skip to first unread message

nate_work barish

unread,
Jan 3, 2025, 11:44:47 AMJan 3
to Excel-DNA
This guide shows how to forward excel DNA trace logging to Nlog via the config file https://excel-dna.net/docs/archive/wiki/Diagnostic-Logging/#redirecting-to-nlog

This guide https://excel-dna.net/docs/guides-advanced/logging_configuration_netcore/ mentions the config file support is no longer available in net6 and gives some registry settings that will cause the excel DNA trace logging to be written to a file.

Those both work fine, but is there any way to get the excel dna trace logging to be forwarded to Nlog in net 6?

Thanks

Govert van Drimmelen

unread,
Jan 7, 2025, 2:59:27 PMJan 7
to Excel-DNA
Hi Nate,

We don't currently have an extensibility mechanism for the Excel-DNA logging under .NET core.
I've added a GitHub issue to revisit this: Revisit logging extensibility · Issue #743 · Excel-DNA/ExcelDna

One of the configuration options through the registry of environment variables is to log to the debugger. 
Perhaps it would work to create a 'debugger' add-in which captures debug output, and write these to NLog.
The problem with doing this in your own add-in is that most of what you want to debug is running before your add-in code is loaded.

-Govert
Reply all
Reply to author
Forward
0 new messages