@Test public void testIsLoggable() { final Zlg zlg = mock(Zlg.class, Answers.CALLS_REAL_METHODS); when(zlg.isEnabled(anyInt())).thenAnswer(invocation -> { final int level = invocation.getArgument(0); return level >= LogLevel.WARN; }); final ZlgLogger logger = new ZlgLogger(zlg); assertFalse(logger.isLoggable(Level.INFO)); assertTrue(logger.isLoggable(Level.WARNING)); assertTrue(logger.isLoggable(Level.SEVERE)); }
@Override public boolean isLoggable(Level level) { return zlg.isEnabled(JulMappings.mapLevel(level)); }
ZlgLogger extends AbstractLogger { @Override public boolean isLoggable(Level level) { return zlg.isEnabled(JulMappings.mapLevel(level)); } }
ZlgLogger extends AbstractLogger { @Override public boolean isLoggable(Level level) { return zlg.isEnabled(JulMappings.mapLevel(level)); } ZlgLogger(Zlg zlg); }
ZlgLogger extends AbstractLogger { @Override public boolean isLoggable(Level level) { return zlg.isEnabled(JulMappings.mapLevel(level)); } ZlgLogger(Zlg zlg); @Override void log(Level level, String message); @Override void log(Level level, String message, Throwable thrown); @Override void log(LogEvent logEvent); @Override Level getLevel(); @Override boolean isLoggable(Level level); }
ZlgLogger extends AbstractLogger { @Override public boolean isLoggable(Level level) { return zlg.isEnabled(JulMappings.mapLevel(level)); } ZlgLogger(Zlg zlg); @Override void log(Level level, String message); @Override void log(Level level, String message, Throwable thrown); @Override void log(LogEvent logEvent); @Override Level getLevel(); @Override boolean isLoggable(Level level);  }