Class AuditLogger.Builder
java.lang.Object
org.wildfly.security.audit.AuditLogger.Builder
- Enclosing class:
AuditLogger
A builder for audit logger instances.
- Author:
- Darran Lofthouse
-
Method Summary
Modifier and TypeMethodDescriptionConsumer<org.wildfly.security.auth.server.event.SecurityEvent> build()Construct a new audit logger instance.setAuditEndpoint(org.wildfly.common.function.ExceptionBiConsumer<EventPriority, String, IOException> auditEndpoint) Set the endpoint to receive the resulting audit messages.setMessageFormatter(Function<org.wildfly.security.auth.server.event.SecurityEvent, String> messageFormatter) Set the message formatter to convert the messages to formatted Strings.setPriorityMapper(Function<org.wildfly.security.auth.server.event.SecurityEvent, EventPriority> priorityMapper) Set the priority mapper to assign a priority to the messages.
-
Method Details
-
setAuditEndpoint
public AuditLogger.Builder setAuditEndpoint(org.wildfly.common.function.ExceptionBiConsumer<EventPriority, String, IOException> auditEndpoint) Set the endpoint to receive the resulting audit messages.- Parameters:
auditEndpoint- the endpoint to receive the resulting audit messages.- Returns:
- this builder.
-
setPriorityMapper
public AuditLogger.Builder setPriorityMapper(Function<org.wildfly.security.auth.server.event.SecurityEvent, EventPriority> priorityMapper) Set the priority mapper to assign a priority to the messages.- Parameters:
priorityMapper- the priority mapper to assign a priority to the messages.- Returns:
- this builder.
-
setMessageFormatter
public AuditLogger.Builder setMessageFormatter(Function<org.wildfly.security.auth.server.event.SecurityEvent, String> messageFormatter) Set the message formatter to convert the messages to formatted Strings.- Parameters:
messageFormatter- the message formatter to convert the messages to formatted Strings.- Returns:
- this builder.
-
build
Construct a new audit logger instance.- Returns:
- the built audit logger.
-