@Test public void testLogWithoutLocationWithMessageOnly() { final Logger log = mock(Logger.class); final Slf4jLogTarget target = new Slf4jLogTarget(log); target.log(LogLevel.TRACE, null, "format %s", 1, new Object[] {"arg"}, null, Zlg.entrypoint); verify(log).trace(eq("format arg")); }
@Override public void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint) { if (isLocationAware) { logWithLocation(level, tag, format, argc, argv, throwable, entrypoint); } else { logDirect(level, tag, format, argc, argv, throwable); } }
Slf4jLogTarget implements LogTarget { @Override public void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint) { if (isLocationAware) { logWithLocation(level, tag, format, argc, argv, throwable, entrypoint); } else { logDirect(level, tag, format, argc, argv, throwable); } } }
Slf4jLogTarget implements LogTarget { @Override public void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint) { if (isLocationAware) { logWithLocation(level, tag, format, argc, argv, throwable, entrypoint); } else { logDirect(level, tag, format, argc, argv, throwable); } } Slf4jLogTarget(Logger log); }
Slf4jLogTarget implements LogTarget { @Override public void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint) { if (isLocationAware) { logWithLocation(level, tag, format, argc, argv, throwable, entrypoint); } else { logDirect(level, tag, format, argc, argv, throwable); } } Slf4jLogTarget(Logger log); @Override boolean isEnabled(int level); @Override void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint); }
Slf4jLogTarget implements LogTarget { @Override public void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint) { if (isLocationAware) { logWithLocation(level, tag, format, argc, argv, throwable, entrypoint); } else { logDirect(level, tag, format, argc, argv, throwable); } } Slf4jLogTarget(Logger log); @Override boolean isEnabled(int level); @Override void log(int level, String tag, String format, int argc, Object[] argv, Throwable throwable, String entrypoint);  }