@Test public void testCustomLogFormatWithSubject() { Slf4jAuditLogger logger = loggerWithConfig("User = ${USER}, Status = {${STATUS}}, Subject = ${SUBJECT}"); logger.log(logEntryWithAll); assertThat(getSlf4jLogMessage()) .isEqualTo("User = user, Status = {ATTEMPT}, Subject = the_subject"); }
@Override public void log(AuditEntry logEntry) { auditLogger.info(formatter.getLogTemplate(), formatter.getArgumentsForEntry(logEntry)); }
Slf4jAuditLogger implements AuditLogger { @Override public void log(AuditEntry logEntry) { auditLogger.info(formatter.getLogTemplate(), formatter.getArgumentsForEntry(logEntry)); } }
Slf4jAuditLogger implements AuditLogger { @Override public void log(AuditEntry logEntry) { auditLogger.info(formatter.getLogTemplate(), formatter.getArgumentsForEntry(logEntry)); } Slf4jAuditLogger(Map<String, String> parameters); @VisibleForTesting  Slf4jAuditLogger(Map<String, String> parameters, String loggerName); @VisibleForTesting  Slf4jAuditLogger(Slf4jAuditLoggerConfig auditConfig, Logger logger); }
Slf4jAuditLogger implements AuditLogger { @Override public void log(AuditEntry logEntry) { auditLogger.info(formatter.getLogTemplate(), formatter.getArgumentsForEntry(logEntry)); } Slf4jAuditLogger(Map<String, String> parameters); @VisibleForTesting  Slf4jAuditLogger(Map<String, String> parameters, String loggerName); @VisibleForTesting  Slf4jAuditLogger(Slf4jAuditLoggerConfig auditConfig, Logger logger); @Override void log(AuditEntry logEntry); }
Slf4jAuditLogger implements AuditLogger { @Override public void log(AuditEntry logEntry) { auditLogger.info(formatter.getLogTemplate(), formatter.getArgumentsForEntry(logEntry)); } Slf4jAuditLogger(Map<String, String> parameters); @VisibleForTesting  Slf4jAuditLogger(Map<String, String> parameters, String loggerName); @VisibleForTesting  Slf4jAuditLogger(Slf4jAuditLoggerConfig auditConfig, Logger logger); @Override void log(AuditEntry logEntry); static final String AUDIT_LOGGER_NAME; }