Squirrel
Squirrel

Reputation: 1385

An Asserting Appender for 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?

Upvotes: 1

Views: 1350

Answers (1)

Peter Lillevold
Peter Lillevold

Reputation: 33930

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.

Upvotes: 2

Related Questions