@Test public void log_shouldNotAcquireALockOrInteractWithTheDestination_givenAProblemObtainingCorrelationIds() throws Exception { when(diagnosticContextSupplier.getMessageContext()).thenThrow(new RuntimeException()); logger.log(TestMessages.Foo); verifyZeroInteractions(lock, destination); }
@Override public void log(T message, Object... details) { try { LogicalLogRecord<T> record = constructLogRecord(message, Optional.empty(), details); publish(record); } catch (Throwable t) { errorHandler.accept(t); } }
BasicOpsLogger implements OpsLogger<T> { @Override public void log(T message, Object... details) { try { LogicalLogRecord<T> record = constructLogRecord(message, Optional.empty(), details); publish(record); } catch (Throwable t) { errorHandler.accept(t); } } }
BasicOpsLogger implements OpsLogger<T> { @Override public void log(T message, Object... details) { try { LogicalLogRecord<T> record = constructLogRecord(message, Optional.empty(), details); publish(record); } catch (Throwable t) { errorHandler.accept(t); } } BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler); private  BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler, boolean closeable); }
BasicOpsLogger implements OpsLogger<T> { @Override public void log(T message, Object... details) { try { LogicalLogRecord<T> record = constructLogRecord(message, Optional.empty(), details); publish(record); } catch (Throwable t) { errorHandler.accept(t); } } BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler); private  BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler, boolean closeable); @Override void close(); @Override void log(T message, Object... details); @Override void logThrowable(T message, Throwable cause, Object... details); @Override BasicOpsLogger<T> with(DiagnosticContextSupplier override); Clock getClock(); Destination<T> getDestination(); DiagnosticContextSupplier getDiagnosticContextSupplier(); Lock getLock(); Consumer<Throwable> getErrorHandler(); }
BasicOpsLogger implements OpsLogger<T> { @Override public void log(T message, Object... details) { try { LogicalLogRecord<T> record = constructLogRecord(message, Optional.empty(), details); publish(record); } catch (Throwable t) { errorHandler.accept(t); } } BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler); private  BasicOpsLogger(Clock clock, DiagnosticContextSupplier diagnosticContextSupplier, Destination<T> destination, Lock lock, Consumer<Throwable> errorHandler, boolean closeable); @Override void close(); @Override void log(T message, Object... details); @Override void logThrowable(T message, Throwable cause, Object... details); @Override BasicOpsLogger<T> with(DiagnosticContextSupplier override); Clock getClock(); Destination<T> getDestination(); DiagnosticContextSupplier getDiagnosticContextSupplier(); Lock getLock(); Consumer<Throwable> getErrorHandler();  }