@Test public void testWithThrown() { Throwable cause = new Throwable("Goodbye World"); LogData data = FakeLogData.withPrintfStyle("Hello World") .addMetadata(LogContext.Key.LOG_CAUSE, cause); LogRecord record = SimpleLogRecord.create(data); assertThat(record.getThrown()).isSameInstanceAs(cause); }
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);  }