Class FileBasedAuditEventRepository
java.lang.Object
se.swedenconnect.spring.saml.idp.audit.repository.FilteringAuditEventRepository
se.swedenconnect.spring.saml.idp.audit.repository.FileBasedAuditEventRepository
- All Implemented Interfaces:
org.springframework.boot.actuate.audit.AuditEventRepository
A write-only
AuditEventRepository
that writes audit events to a file.- Author:
- Martin Lindström
-
Constructor Summary
ConstructorDescriptionFileBasedAuditEventRepository
(String logFile, AuditEventMapper eventMapper) Constructor mapping toFileBasedAuditEventRepository(String, AuditEventMapper, Predicate)
where the filter allows all events.FileBasedAuditEventRepository
(String logFile, 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
-
FileBasedAuditEventRepository
public FileBasedAuditEventRepository(String logFile, AuditEventMapper eventMapper) throws IOException Constructor mapping toFileBasedAuditEventRepository(String, AuditEventMapper, Predicate)
where the filter allows all events.- Parameters:
logFile
- the log file including its patheventMapper
- the event mapper used to map events to strings- Throws:
IOException
- if the logfile is invalid
-
FileBasedAuditEventRepository
public FileBasedAuditEventRepository(String logFile, AuditEventMapper eventMapper, Predicate<org.springframework.boot.actuate.audit.AuditEvent> filter) throws IOException Constructor.- Parameters:
logFile
- the log file including its patheventMapper
- the event mapper used to map events to stringsfilter
- filter for determining which events to log- Throws:
IOException
- if the logfile is invalid
-
-
Method Details
-
addEvent
public 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
-