Package org.wildfly.security.audit
Class AuditLogger
- java.lang.Object
-
- org.wildfly.security.audit.AuditLogger
-
- All Implemented Interfaces:
Consumer<SecurityEvent>
public final class AuditLogger extends Object implements Consumer<SecurityEvent>
The audit logger implementation.- Author:
- Darran Lofthouse
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AuditLogger.Builder
A builder for audit logger instances.
-
Field Summary
Fields Modifier and Type Field Description private org.wildfly.common.function.ExceptionBiConsumer<EventPriority,String,IOException>
auditEndpoint
private Function<SecurityEvent,String>
messageFormatter
private Function<SecurityEvent,EventPriority>
priorityMapper
-
Constructor Summary
Constructors Constructor Description AuditLogger(AuditLogger.Builder builder)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(SecurityEvent event)
Accept security event to be processed by audit endpoints.static AuditLogger.Builder
builder()
Obtain a newAuditLogger.Builder
capable of building aAuditLogger
.
-
-
-
Field Detail
-
auditEndpoint
private final org.wildfly.common.function.ExceptionBiConsumer<EventPriority,String,IOException> auditEndpoint
-
priorityMapper
private final Function<SecurityEvent,EventPriority> priorityMapper
-
messageFormatter
private final Function<SecurityEvent,String> messageFormatter
-
-
Constructor Detail
-
AuditLogger
AuditLogger(AuditLogger.Builder builder)
-
-
Method Detail
-
accept
public void accept(SecurityEvent event)
Accept security event to be processed by audit endpoints.- Specified by:
accept
in interfaceConsumer<SecurityEvent>
- Parameters:
event
- security event to be processed
-
builder
public static AuditLogger.Builder builder()
Obtain a newAuditLogger.Builder
capable of building aAuditLogger
.- Returns:
- a new
AuditLogger.Builder
capable of building aAuditLogger
-
-