FileDocCategorySizeDatePackage
NTEventLogAppenderTest.javaAPI DocApache log4j 1.2.151632Sat Aug 25 00:09:32 BST 2007org.apache.log4j.nt

NTEventLogAppenderTest

public class NTEventLogAppenderTest extends TestCase
NTEventLogAppender tests.
author
Curt Arnold

Fields Summary
Constructors Summary
Methods Summary
public voidtearDown()
Clean up configuration after each test.

    LogManager.shutdown();
  
public voidtestSimple()
Simple test of NTEventLogAppender.

    BasicConfigurator.configure(new NTEventLogAppender());
    Logger logger = Logger.getLogger("org.apache.log4j.nt.NTEventLogAppenderTest");
    int i  = 0;
    logger.debug( "Message " + i++);
    logger.info( "Message " + i++);
    logger.warn( "Message " + i++);
    logger.error( "Message " + i++);
    logger.log(Level.FATAL, "Message " + i++);
    logger.debug("Message " + i++,  new Exception("Just testing."));