I am using the InMemoryAppender for that, and it is working great.
I don't want to enable all the logging, just one specific logger, and only
for a very short period of time.

On 2/27/07, Ron Grabowski <[EMAIL PROTECTED]> wrote:


Open up just one log file and inspect it or one log message and inspect
that?

Could you write an Appender that keeps the last N messages in memory then
inspect those messages during testing?


----- Original Message ----

From: Ayende Rahien <[EMAIL PROTECTED]>

To: log4net-dev@logging.apache.org

Sent: Tuesday, February 27, 2007 11:19:15 AM

Subject: Configuring from code



I need to configure log4net from code, to verify that some of my code is
output the correct log messages.

The issue is that I basically wants to do something like:

EnableLogsFor("MyLogger");

//run test

   StopLogging();



The real problem is that the amount of logs that are generates is fairly
huge, and I want to be able to open just one, and close just one, without
impacting anything else.

Any ideas how I can do that?








Reply via email to