Package org.wildfly.security.audit
Class PeriodicRotatingFileAuditEndpoint
java.lang.Object
org.wildfly.security.audit.FileAuditEndpoint
org.wildfly.security.audit.PeriodicRotatingFileAuditEndpoint
- All Implemented Interfaces:
Closeable,AutoCloseable,org.wildfly.common.function.ExceptionBiConsumer<EventPriority,,String, IOException> AuditEndpoint
An audit endpoint which rotates the log at a preset time interval.
Depending on set suffix, moves old log records into files tagged by timestamp.
Based on PeriodicSizeRotatingFileHandler.
- Author:
- Jan Kalina, James R. Perkins, Yeray Borges
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for periodic rotating file audit endpoints. -
Field Summary
Fields inherited from class org.wildfly.security.audit.FileAuditEndpoint
clock -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Obtain a newPeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.protected voidChecks whether time-based log rotation should be done and if so, it moves current log file into time-tagged file and exchange target file to continue logging into new, non-time-tagged file.Methods inherited from class org.wildfly.security.audit.FileAuditEndpoint
accept, closeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.wildfly.common.function.ExceptionBiConsumer
andThen, compose
-
Method Details
-
preWrite
Checks whether time-based log rotation should be done and if so, it moves current log file into time-tagged file and exchange target file to continue logging into new, non-time-tagged file.- Parameters:
instant- time of the message acceptance
-
builder
Obtain a newPeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.- Returns:
- a new
PeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.
-