ActionLog { boolean flushTraceLog() { return trace || result.value >= WARN.value; } ActionLog(String message, String id); long elapsed(); String errorCode(); void context(String key, Object... values); void stat(String key, double value); int track(String operation, long elapsed, int readEntries, int writeEntries); String correlationId(); void action(String action); final String id; final Map<String, List<String>> context; final Map<String, Double> stats; final Instant date; public boolean trace; public String action; public List<String> correlationIds; public List<String> clients; public List<String> refIds; public boolean suppressSlowSQLWarning; }
@Test void flushTraceLogWithTrace() { log.trace = true; assertThat(log.flushTraceLog()).isTrue(); }
@Test void flushTraceLog() { assertThat(log.flushTraceLog()).isFalse(); }