@Test public void publish_shouldPublishAFormattedLogRecord() throws Exception { LogicalLogRecord<TestMessages> record = new LogicalLogRecord<>(Instant.now(), new DiagnosticContext(Collections::emptyMap), TestMessages.Foo, Optional.empty()); String expectedMessage = record.format(processor) + System.getProperty("line.separator"); destination.publish(record); assertEquals(expectedMessage, output.toString()); }
@Override public void publish(LogicalLogRecord<T> record) throws Exception { output.println(record.format(stackTraceProcessor)); }
OutputStreamDestination implements Destination<T> { @Override public void publish(LogicalLogRecord<T> record) throws Exception { output.println(record.format(stackTraceProcessor)); } }
OutputStreamDestination implements Destination<T> { @Override public void publish(LogicalLogRecord<T> record) throws Exception { output.println(record.format(stackTraceProcessor)); } OutputStreamDestination(PrintStream output, StackTraceProcessor stackTraceProcessor); }
OutputStreamDestination implements Destination<T> { @Override public void publish(LogicalLogRecord<T> record) throws Exception { output.println(record.format(stackTraceProcessor)); } OutputStreamDestination(PrintStream output, StackTraceProcessor stackTraceProcessor); @Override void beginBatch(); @Override void publish(LogicalLogRecord<T> record); @Override void endBatch(); @Override void close(); PrintStream getOutput(); @Override StackTraceProcessor getStackTraceProcessor(); }
OutputStreamDestination implements Destination<T> { @Override public void publish(LogicalLogRecord<T> record) throws Exception { output.println(record.format(stackTraceProcessor)); } OutputStreamDestination(PrintStream output, StackTraceProcessor stackTraceProcessor); @Override void beginBatch(); @Override void publish(LogicalLogRecord<T> record); @Override void endBatch(); @Override void close(); PrintStream getOutput(); @Override StackTraceProcessor getStackTraceProcessor();  }