@Test public void testIsEnabled() { final Logger log = mock(Logger.class); final LogLevel.Enum enabledLevel = LogLevel.Enum.CONF; enableUpTo(log, enabledLevel); final Slf4jLogTarget target = new Slf4jLogTarget(log); for (LogLevel.Enum level : LogLevel.Enum.values()) { if (level.getLevel() != LogLevel.OFF) { assertEquals("level=" + level, level.getLevel() >= enabledLevel.getLevel(), target.isEnabled(level.getLevel())); } } }
@Override public boolean isEnabled(int level) { return map(level).logEnabled.isEnabled(); }
Slf4jLogTarget implements LogTarget { @Override public boolean isEnabled(int level) { return map(level).logEnabled.isEnabled(); } }
Slf4jLogTarget implements LogTarget { @Override public boolean isEnabled(int level) { return map(level).logEnabled.isEnabled(); } Slf4jLogTarget(Logger log); }
Slf4jLogTarget implements LogTarget { @Override public boolean isEnabled(int level) { return map(level).logEnabled.isEnabled(); } 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 boolean isEnabled(int level) { return map(level).logEnabled.isEnabled(); } 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);  }