@Test public void testLiteral() { LogData data = FakeLogData.of("literal message").setLevel(Level.WARNING); LogRecord record = SimpleLogRecord.create(data); assertThat(record.getLevel()).isEqualTo(Level.WARNING); assertThat(record.getMessage()).isEqualTo("literal message"); assertThat(record.getParameters()).isNull(); assertThat(record.getLoggerName()).isEqualTo(data.getLoggerName()); assertThat(record.getSourceClassName()).isEqualTo(data.getLogSite().getClassName()); assertThat(record.getSourceMethodName()).isEqualTo(data.getLogSite().getMethodName()); }
public static SimpleLogRecord create(LogData data) { return new SimpleLogRecord(data); }
SimpleLogRecord extends AbstractLogRecord implements SimpleLogHandler { public static SimpleLogRecord create(LogData data) { return new SimpleLogRecord(data); } }
SimpleLogRecord extends AbstractLogRecord implements SimpleLogHandler { public static SimpleLogRecord create(LogData data) { return new SimpleLogRecord(data); } private  SimpleLogRecord(LogData data); private  SimpleLogRecord(RuntimeException error, LogData data); }
SimpleLogRecord extends AbstractLogRecord implements SimpleLogHandler { public static SimpleLogRecord create(LogData data) { return new SimpleLogRecord(data); } private  SimpleLogRecord(LogData data); private  SimpleLogRecord(RuntimeException error, LogData data); static SimpleLogRecord create(LogData data); static SimpleLogRecord error(RuntimeException error, LogData data); @Override void handleFormattedLogMessage(Level level, String message, @NullableDecl Throwable thrown); }
SimpleLogRecord extends AbstractLogRecord implements SimpleLogHandler { public static SimpleLogRecord create(LogData data) { return new SimpleLogRecord(data); } private  SimpleLogRecord(LogData data); private  SimpleLogRecord(RuntimeException error, LogData data); static SimpleLogRecord create(LogData data); static SimpleLogRecord error(RuntimeException error, LogData data); @Override void handleFormattedLogMessage(Level level, String message, @NullableDecl Throwable thrown);  }