DubboAppender extends FileAppender { public static void clear() { logList.clear(); } DubboAppender(); static void doStart(); static void doStop(); static void clear(); @Override void append(LoggingEvent event); static boolean available; static List<Log> logList; }
@Test public void testClear() throws Exception { DubboAppender.doStart(); DubboAppender appender = new DubboAppender(); appender.append(event); DubboAppender.clear(); }