Create new instance. super(testName);
super(testName);
DOMConfigurator.configure("input/xml/SocketAppenderTestConfig.xml"); logger = Logger.getLogger(SocketAppenderTest.class); primary = logger.getAppender("remote"); secondary = (LastOnlyAppender) Logger.getLogger( "org.apache.log4j.net.SocketAppenderTestDummy").getAppender("lastOnly");
String msg = "testFallbackErrorHandlerWhenStarting"; logger.debug(msg); // above debug log will fail and shoul be redirected to secondary appender assertEquals("SocketAppender with FallbackErrorHandler", msg, secondary.getLastMessage());