Class LoggerAuditEventRepository
java.lang.Object
se.swedenconnect.spring.saml.idp.audit.repository.FilteringAuditEventRepository
se.swedenconnect.spring.saml.idp.audit.repository.LoggerAuditEventRepository
- All Implemented Interfaces:
org.springframework.boot.actuate.audit.AuditEventRepository
A
AuditEventRepository
that logs to a named
logger.- Author:
- Martin Lindström
-
Constructor Summary
ConstructorDescriptionLoggerAuditEventRepository
(String loggerName, org.slf4j.event.Level logLevel, AuditEventMapper eventMapper) Constructor mapping toLoggerAuditEventRepository(String, Level, AuditEventMapper, Predicate)
where the filter allows all events.LoggerAuditEventRepository
(String loggerName, org.slf4j.event.Level logLevel, AuditEventMapper eventMapper, Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter) Constructor. -
Method Summary
Methods inherited from class se.swedenconnect.spring.saml.idp.audit.repository.FilteringAuditEventRepository
add, exclusionPredicate, inclusionExclusionPredicate, inclusionPredicate
-
Constructor Details
-
LoggerAuditEventRepository
public LoggerAuditEventRepository(@Nonnull String loggerName, @Nullable org.slf4j.event.Level logLevel, @Nonnull AuditEventMapper eventMapper) Constructor mapping toLoggerAuditEventRepository(String, Level, AuditEventMapper, Predicate)
where the filter allows all events.- Parameters:
loggerName
- the name of the loggerlogLevel
- the log level to use (INFO is defaylt)eventMapper
- the event mapper used to map events to strings
-
LoggerAuditEventRepository
public LoggerAuditEventRepository(@Nonnull String loggerName, @Nullable org.slf4j.event.Level logLevel, @Nonnull AuditEventMapper eventMapper, @Nullable Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter) Constructor.- Parameters:
loggerName
- the name of the loggerlogLevel
- the log level to use (INFO is defaylt)eventMapper
- the event mapper used to map events to stringsfilter
- filter for determining which events to log
-
-
Method Details
-
addEvent
protected void addEvent(org.springframework.boot.actuate.audit.AuditEvent event) Logs an event.- Specified by:
addEvent
in classFilteringAuditEventRepository
- Parameters:
event
- the audit event to log
-
find
public List<org.springframework.boot.actuate.audit.AuditEvent> find(String principal, Instant after, String type) Will always return an empty list.
-