Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/logging/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Logging 如何在Microsoft.Practices.EnterpriseLibrary.Semanticulling单元测试中找出具有相同密钥的密钥_Logging_Enterprise Library - Fatal编程技术网

Logging 如何在Microsoft.Practices.EnterpriseLibrary.Semanticulling单元测试中找出具有相同密钥的密钥

Logging 如何在Microsoft.Practices.EnterpriseLibrary.Semanticulling单元测试中找出具有相同密钥的密钥,logging,enterprise-library,Logging,Enterprise Library,我正在使用企业库的语义日志记录。当我运行单元测试时: EventSourceAnalyzer.InspectAll(MyEventSource.Log) 它失败,引发异常: System.ArgumentException:已添加具有相同密钥的项 这一切都很好,但我在上次签入时做了一些更改。有没有办法找出已经添加了什么密钥 当我添加ObservieEventLister时,应用程序也会失败,并显示相同的错误消息: _logListener.EnableEvents(MyEventSource.

我正在使用企业库的语义日志记录。当我运行单元测试时:

EventSourceAnalyzer.InspectAll(MyEventSource.Log)
它失败,引发异常:

System.ArgumentException:已添加具有相同密钥的项

这一切都很好,但我在上次签入时做了一些更改。有没有办法找出已经添加了什么密钥

当我添加ObservieEventLister时,应用程序也会失败,并显示相同的错误消息:

_logListener.EnableEvents(MyEventSource.Log, EventLevel.Verbose, Keywords.All)
编辑: 我通过注释不同的区域找到了失败的关键点,但我看不出这些是重复的。清洗溶液后,一切正常。但是这个问题仍然相关。有没有一种简单的方法可以找到重复的钥匙,而不是我不得不用的那种方法