LogTree extends LogTreeNode implements Logger { @Override public void error(String msg) { error((Marker) null, msg); } LogTree(); @Override void log(org.slf4j.Logger targetLogger); @Override void log(LogEvent logEvent); void pop(); @Override String getName(); @Override boolean isTraceEnabled(); @Override void trace(String msg); @Override void trace(String format, Object arg); @Override void trace(String format, Object arg1, Object arg2); @Override void trace(String format, Object... arguments); @Override void trace(String msg, Throwable t); @Override boolean isTraceEnabled(Marker marker); @Override void trace(Marker marker, String msg); @Override void trace(Marker marker, String format, Object arg); @Override void trace(Marker marker, String format, Object arg1, Object arg2); @Override void trace(Marker marker, String format, Object... arguments); @Override void trace(Marker marker, String msg, Throwable t); @Override boolean isDebugEnabled(); @Override void debug(String msg); @Override void debug(String format, Object arg); @Override void debug(String format, Object arg1, Object arg2); @Override void debug(String format, Object... arguments); @Override void debug(String msg, Throwable t); @Override boolean isDebugEnabled(Marker marker); @Override void debug(Marker marker, String msg); @Override void debug(Marker marker, String format, Object arg); @Override void debug(Marker marker, String format, Object arg1, Object arg2); @Override void debug(Marker marker, String format, Object... arguments); @Override void debug(Marker marker, String msg, Throwable t); @Override boolean isInfoEnabled(); @Override void info(String msg); @Override void info(String format, Object arg); @Override void info(String format, Object arg1, Object arg2); @Override void info(String format, Object... arguments); @Override void info(String msg, Throwable t); @Override boolean isInfoEnabled(Marker marker); @Override void info(Marker marker, String msg); @Override void info(Marker marker, String format, Object arg); @Override void info(Marker marker, String format, Object arg1, Object arg2); @Override void info(Marker marker, String format, Object... arguments); @Override void info(Marker marker, String msg, Throwable t); @Override boolean isWarnEnabled(); @Override void warn(String msg); @Override void warn(String format, Object arg); @Override void warn(String format, Object arg1, Object arg2); @Override void warn(String format, Object... arguments); @Override void warn(String msg, Throwable t); @Override boolean isWarnEnabled(Marker marker); @Override void warn(Marker marker, String msg); @Override void warn(Marker marker, String format, Object arg); @Override void warn(Marker marker, String format, Object arg1, Object arg2); @Override void warn(Marker marker, String format, Object... arguments); @Override void warn(Marker marker, String msg, Throwable t); @Override boolean isErrorEnabled(); @Override void error(String msg); @Override void error(String format, Object arg); @Override void error(String format, Object arg1, Object arg2); @Override void error(String format, Object... arguments); @Override void error(String msg, Throwable t); @Override boolean isErrorEnabled(Marker marker); @Override void error(Marker marker, String msg); @Override void error(Marker marker, String format, Object arg); @Override void error(Marker marker, String format, Object arg1, Object arg2); @Override void error(Marker marker, String format, Object... arguments); @Override void error(Marker marker, String msg, Throwable t);  }
@Test void twoLevel0() { LogTree logTree = new LogTree(); logTree.error("message1"); logTree.error("message2"); assertEquals(2, logTree.size(false)); assertEquals(2, logTree.size(true)); }
@Test void ThreeLevels() { LogTree logTree = new LogTree(); logTree.error(LogEvent.MARKER_BEGIN, "begin1"); logTree.error("message11"); logTree.error(LogEvent.MARKER_BEGIN, "begin12"); logTree.error("message121"); logTree.error("message122"); logTree.error(LogEvent.MARKER_END, "end12"); logTree.error(LogEvent.MARKER_END, "end1"); logTree.error(LogEvent.MARKER_BEGIN, "begin2"); logTree.error("message21"); logTree.error(LogEvent.MARKER_BEGIN, "begin22"); logTree.error("message221"); logTree.error("message222"); logTree.error(LogEvent.MARKER_END, "end22"); logTree.error(LogEvent.MARKER_END, "end2"); assertEquals(2, logTree.size(false)); assertEquals(14, logTree.size(true)); Iterator<LogEvent> iterator0 = logTree.iterator(); LogTreeNode node1 = (LogTreeNode) iterator0.next(); assertEquals(3, node1.size(false)); assertEquals(6, node1.size(true)); Iterator<LogEvent> iterator1 = node1.iterator(); iterator1.next(); LogTreeNode node11 = (LogTreeNode) iterator1.next(); assertEquals(3, node11.size(false)); assertEquals(3, node11.size(true)); }