@Test public void append() throws IOException { compositeTraceAppender.cleanup(); compositeTraceAppender.append("test compositeTraceAppender"); compositeTraceAppender.flush(); Resource[] resources = resolver.getResources("file:" + TracerLogRootDaemon.LOG_FILE_DIR + File.separator + COMPOSITE_TEST_FILE_NAME); Assert.assertTrue(resources.length == 1); String logText = FileUtils.readFileToString(resources[0].getFile()); Assert.assertTrue(logText.equals("test compositeTraceAppender")); }
@Override public void append(String log) throws IOException { for (TraceAppender traceAppender : traceAppenders.values()) { traceAppender.append(log); } }
CompositeTraceAppender implements TraceAppender { @Override public void append(String log) throws IOException { for (TraceAppender traceAppender : traceAppenders.values()) { traceAppender.append(log); } } }
CompositeTraceAppender implements TraceAppender { @Override public void append(String log) throws IOException { for (TraceAppender traceAppender : traceAppenders.values()) { traceAppender.append(log); } }  }
CompositeTraceAppender implements TraceAppender { @Override public void append(String log) throws IOException { for (TraceAppender traceAppender : traceAppenders.values()) { traceAppender.append(log); } }  TraceAppender getAppender(String logName); void putAppender(String logName, TraceAppender traceAppender); @Override void flush(); @Override void append(String log); @Override void cleanup(); }
CompositeTraceAppender implements TraceAppender { @Override public void append(String log) throws IOException { for (TraceAppender traceAppender : traceAppenders.values()) { traceAppender.append(log); } }  TraceAppender getAppender(String logName); void putAppender(String logName, TraceAppender traceAppender); @Override void flush(); @Override void append(String log); @Override void cleanup();  }