@Test public void setStackTraceStoragePath_shouldThrowAnException_givenAPathThatExistsAndIsNotADirectory() throws Exception { Path file = tempFiles.createTempFile(".txt"); try { factory.setStackTraceStoragePath(file); fail("expected an exception"); } catch (IllegalArgumentException expected) { assertThat(expected.getMessage(), containsString("must be a directory")); } }
public OpsLoggerFactory setStackTraceStoragePath(Path directory) { validateParametersForSetStackTraceStoragePath(directory); clearCachedInstance(); setStoreStackTracesInFilesystem(true); stackTraceStoragePath = Optional.of(directory); return this; }
OpsLoggerFactory { public OpsLoggerFactory setStackTraceStoragePath(Path directory) { validateParametersForSetStackTraceStoragePath(directory); clearCachedInstance(); setStoreStackTracesInFilesystem(true); stackTraceStoragePath = Optional.of(directory); return this; } }
OpsLoggerFactory { public OpsLoggerFactory setStackTraceStoragePath(Path directory) { validateParametersForSetStackTraceStoragePath(directory); clearCachedInstance(); setStoreStackTracesInFilesystem(true); stackTraceStoragePath = Optional.of(directory); return this; }  }
OpsLoggerFactory { public OpsLoggerFactory setStackTraceStoragePath(Path directory) { validateParametersForSetStackTraceStoragePath(directory); clearCachedInstance(); setStoreStackTracesInFilesystem(true); stackTraceStoragePath = Optional.of(directory); return this; }  OpsLoggerFactory setDestination(PrintStream printStream); OpsLoggerFactory setPath(Path path); OpsLoggerFactory setStoreStackTracesInFilesystem(boolean store); OpsLoggerFactory setStackTraceStoragePath(Path directory); OpsLoggerFactory setErrorHandler(Consumer<Throwable> handler); @Deprecated OpsLoggerFactory setCorrelationIdSupplier(Supplier<Map<String,String>> supplier); OpsLoggerFactory setGlobalDiagnosticContextSupplier(DiagnosticContextSupplier supplier); OpsLoggerFactory setAsync(boolean async); @SuppressWarnings("unchecked") OpsLogger<T> build(); }
OpsLoggerFactory { public OpsLoggerFactory setStackTraceStoragePath(Path directory) { validateParametersForSetStackTraceStoragePath(directory); clearCachedInstance(); setStoreStackTracesInFilesystem(true); stackTraceStoragePath = Optional.of(directory); return this; }  OpsLoggerFactory setDestination(PrintStream printStream); OpsLoggerFactory setPath(Path path); OpsLoggerFactory setStoreStackTracesInFilesystem(boolean store); OpsLoggerFactory setStackTraceStoragePath(Path directory); OpsLoggerFactory setErrorHandler(Consumer<Throwable> handler); @Deprecated OpsLoggerFactory setCorrelationIdSupplier(Supplier<Map<String,String>> supplier); OpsLoggerFactory setGlobalDiagnosticContextSupplier(DiagnosticContextSupplier supplier); OpsLoggerFactory setAsync(boolean async); @SuppressWarnings("unchecked") OpsLogger<T> build();  }