Package org.wildfly.security.audit
Class AuditLogger.Builder
java.lang.Object
org.wildfly.security.audit.AuditLogger.Builder
- Enclosing class:
- AuditLogger
A builder for audit logger instances.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()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<SecurityEvent, String> messageFormatter) Set the message formatter to convert the messages to formatted Strings.setPriorityMapper(Function<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
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
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.
-