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
public class PeriodicRotatingFileAuditEndpoint extends FileAuditEndpoint
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 Classes Modifier and Type Class Description static classPeriodicRotatingFileAuditEndpoint.BuilderA builder for periodic rotating file audit endpoints.
-
Field Summary
-
Fields inherited from class org.wildfly.security.audit.FileAuditEndpoint
clock
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PeriodicRotatingFileAuditEndpoint.Builderbuilder()Obtain a newPeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.protected voidpreWrite(Instant instant)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.-
Methods inherited from class org.wildfly.security.audit.FileAuditEndpoint
accept, close
-
-
-
-
Method Detail
-
preWrite
protected void preWrite(Instant instant)
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
public static PeriodicRotatingFileAuditEndpoint.Builder builder()
Obtain a newPeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.- Returns:
- a new
PeriodicRotatingFileAuditEndpoint.Buildercapable of building aPeriodicRotatingFileAuditEndpoint.
-
-