Log4Net 的断言 Appender?
是否有一种“标准”方法来引入针对 Log4Net 输出的断言?
例如,
NUnit.Log4Net.Checkpoint()
...run some code that should not throw warnings...
NUnit.Log4Net.AssertNoErrors()
NUnit.Log4Net.AssertNoErrorsOrWarnings()
或者
NUnit.Log4Net.Checkpoint()
...code that warns user about an obsolete value...
NUnit.Log4Net.AssertOneWarnings("obsolete value used")
我可以为 Log4Net 编写一个断言附加程序,但我认为肯定已经有一些东西了?
Is there a 'standard' way to introduce assertions against Log4Net output?
E.g.
NUnit.Log4Net.Checkpoint()
...run some code that should not throw warnings...
NUnit.Log4Net.AssertNoErrors()
NUnit.Log4Net.AssertNoErrorsOrWarnings()
Or
NUnit.Log4Net.Checkpoint()
...code that warns user about an obsolete value...
NUnit.Log4Net.AssertOneWarnings("obsolete value used")
I could code an asserting appender for Log4Net but thought there must be something out there already?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
目前还没有这样的事情(根据谷歌)。
我们正在做的是这个和这个。基本上,我们构建了一些扩展方法,使我们能够针对 MemoryAppender。
There is currently no such thing (according to Google).
What we're doing is a combination of this and this. Basically, we've built some extension methods that enables us to do simple asserts against a MemoryAppender.