ZlgLogger extends AbstractLogger { @Override public void log(Level level, String message) { zlg.level(JulMappings.mapLevel(level)).message(message).entrypoint(entrypoint).log(); } 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);  }
@Test public void testLogEvent() { final MockLogTarget logTarget = new MockLogTarget(); final ZlgLogger logger = new ZlgLogger(logTarget.logger()); final IOException cause = new IOException("test exception"); final LogRecord record = new LogRecord(Level.WARNING, "test message"); record.setThrown(cause); final LogEvent event = new LogEvent(record, new SimpleMemberImpl()); logger.log(event); logTarget.entries().assertCount(1); logTarget.entries() .forLevel(LogLevel.WARN).containing("test message").withThrowableType(IOException.class).assertCount(1); }