@Test public void testGetTimeFormatterWithFormatAndZoneConfigured() { Map<String, String> options = ImmutableMap.of("time_format", "yyyy-MM-dd HH:mm:ss.SSSZ", "time_zone", "Europe/Stockholm"); Slf4jAuditLoggerConfig auditConfig = new Slf4jAuditLoggerConfig(options); Optional<DateTimeFormatter> timeFormatter = auditConfig.getTimeFormatter(); assertThat(timeFormatter).map(f -> f.format(Instant.EPOCH.plusMillis(42))).contains("1970-01-01 01:00:00.042+0100"); assertThat(timeFormatter).map(DateTimeFormatter::getZone).contains(ZoneId.of("Europe/Stockholm")); }
Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(timeFormatter); }
Slf4jAuditLoggerConfig { Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(timeFormatter); } }
Slf4jAuditLoggerConfig { Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(timeFormatter); } Slf4jAuditLoggerConfig(Map<String, String> parameters); }
Slf4jAuditLoggerConfig { Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(timeFormatter); } Slf4jAuditLoggerConfig(Map<String, String> parameters);  }
Slf4jAuditLoggerConfig { Optional<DateTimeFormatter> getTimeFormatter() { return Optional.ofNullable(timeFormatter); } Slf4jAuditLoggerConfig(Map<String, String> parameters);   }