Package org.wildfly.security.audit
Class SizeRotatingFileAuditEndpoint
- java.lang.Object
-
- org.wildfly.security.audit.FileAuditEndpoint
-
- org.wildfly.security.audit.SizeRotatingFileAuditEndpoint
-
- All Implemented Interfaces:
Closeable,AutoCloseable,org.wildfly.common.function.ExceptionBiConsumer<EventPriority,String,IOException>,AuditEndpoint
public class SizeRotatingFileAuditEndpoint extends FileAuditEndpoint
An audit endpoint which rotates the log when log file size reach given value.Moves old log records into files tagged by index - the older has the higher index. When index reach
maxBackupIndex, the oldest log file is removed, so there are at mostmaxBackupIndex + 1log files.Based on
PeriodicSizeRotatingFileHandler.- Author:
- Jan Kalina, James R. Perkins, Yeray Borges
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSizeRotatingFileAuditEndpoint.BuilderA builder for size 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 SizeRotatingFileAuditEndpoint.Builderbuilder()Obtain a newSizeRotatingFileAuditEndpoint.Buildercapable of building aSizeRotatingFileAuditEndpoint.protected voidpreWrite(Instant instant)protected voidwrite(String toWrite)-
Methods inherited from class org.wildfly.security.audit.FileAuditEndpoint
accept, close
-
-
-
-
Method Detail
-
write
protected void write(String toWrite) throws IOException
- Throws:
IOException
-
preWrite
protected void preWrite(Instant instant)
-
builder
public static SizeRotatingFileAuditEndpoint.Builder builder()
Obtain a newSizeRotatingFileAuditEndpoint.Buildercapable of building aSizeRotatingFileAuditEndpoint.- Returns:
- a new
SizeRotatingFileAuditEndpoint.Buildercapable of building aSizeRotatingFileAuditEndpoint.
-
-