logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DWilli...@strohlsystems.com
Subject Re: Reporting events back to Unit-test
Date Wed, 08 Dec 2004 14:24:05 GMT
I would create a special appender for the unit test runs.  I would use a 
remoting appender that the unit test could attach to and read.  As a 
separate appender does not stop the original appender(s) from also 
executing, so long as the thresholds are the same, you know that the same 
information is available in both.

David




"Olav Benum" <olavagfa@hotmail.com> 
12/08/2004 09:13 AM
Please respond to
"Log4NET User" <log4net-user@logging.apache.org>


To
log4net-user@logging.apache.org
cc

Subject
Reporting events back to Unit-test






Hi

I am using NUnit and log4net, and I would like to use log4net to report 
certain events back to the unit test.

What would be the best way to do this?

It seems I can’t generate events and attach to them?

It should be possible to inspect to obtain the relevant logger, and 
inspect 
it at regular intervals.

Also I need to make sure (from unit test at run-time) that what I look for 

is really logged.

One situation where I need this is when I want to test an unavailable 
connection.  This is logged anyway, and as the unit-test don’t know the 
assembly directly, it would be easiest to communicate through the 
logging-framework.

Thanks
Olav

_________________________________________________________________
Free mail? MSN Hotmail ! http://www.msn.be/hotmail





IMPORTANT:  E-mails from this company normally contain confidential material for the sole
use of the intended recipient.  The use, distribution, transmittal or re-transmittal by an
unintended recipient of any communication is prohibited without our express approval in writing
or by e-mail.  If you are not the intended recipient please contact the sender and delete
all copies.  All e-mails sent to or from Strohl Systems are to be used for our business purposes
only.  E-mails sent from or to the company are subject to review by the company.
Mime
View raw message