Excel-DNA / Excel-DNA/ExcelDna
Allow developers to remove the `LogDisplay` trace listener
- Dominant language
- C#
- Stars
- 1.5k
- Forks
- 292
- Avg merge
- 20d 12h
- Merged PRs (30d)
- 1
Description
Currently there's no way to _remove_ the `LogDisplayTraceListener` from the `ExcelDna.Integration` trace source. My expectation is that the code below would remove the (automatically added) `LogDisplay` listener, the same way that it removes the `Default` listener, but in practice it has no effect:
```xml
```
---
Start of a File-New Project add-in:

---
#### Workaround
The current workaround is to add the `LogDisplay` listener to the configuration, and switch it off (`initializeData="Off"`), which is not the same as removing it:
```xml
```
Actually, I'd expect the code above to throw an exception, given that a listener with the name `LogDisplay` already exists (by default) so unless it's removed first, we should get an error.
This is my expectation of the correct code to override the default `LogDisplay` listener:
```xml
```
---
Related documentation
* [Diagnostic Logging](https://github.com/Excel-DNA/ExcelDna/wiki/Diagnostic-Logging#default-configuration)
Contributor guide
Assessment
This issue has not been assessed yet.