@Test public void testGetLevel() { 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); assertEquals(Level.WARNING, logger.getLevel()); }
@Override public Level getLevel() { return JulMappings.findFirst(JulMappings.getDefaultMappings(), zlg::isEnabled); }
ZlgLogger extends AbstractLogger { @Override public Level getLevel() { return JulMappings.findFirst(JulMappings.getDefaultMappings(), zlg::isEnabled); } }
ZlgLogger extends AbstractLogger { @Override public Level getLevel() { return JulMappings.findFirst(JulMappings.getDefaultMappings(), zlg::isEnabled); } ZlgLogger(Zlg zlg); }
ZlgLogger extends AbstractLogger { @Override public Level getLevel() { return JulMappings.findFirst(JulMappings.getDefaultMappings(), zlg::isEnabled); } 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 Level getLevel() { return JulMappings.findFirst(JulMappings.getDefaultMappings(), zlg::isEnabled); } 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);  }