Class SizeRotatingFileAuditEndpoint.Builder

    • Field Detail

      • rotateSize

        private long rotateSize
      • maxBackupIndex

        private int maxBackupIndex
      • rotateOnBoot

        private boolean rotateOnBoot
      • suffix

        private String suffix
    • Constructor Detail

      • Builder

    • Method Detail

      • setRotateSize

        public SizeRotatingFileAuditEndpoint.Builder setRotateSize​(long rotateSize)
        Set the log file size the file should rotate at.
        rotateSize - the size the file should rotate at
        this builder.
      • setSuffix

        public SizeRotatingFileAuditEndpoint.Builder setSuffix​(String suffix)
        Sets the suffix to be appended to the file name during the file rotation. The suffix does not play a role in determining when the file should be rotated.

        The suffix must be a string understood by the DateTimeFormatter.

        Note: Files will be rotated for the same suffix until reach the maximum backup index configured by setMaxBackupIndex(int). If the suffix is resolved to a new value, any files rotated with a different suffix will not be deleted. For example if the suffix is .yyyy-DD-mm, the maximum size was reached 20 times on the same day and the maxBackupIndex was set to 10, then there will only be 10 files kept. What will not be purged is files from a previous day.

        suffix - the suffix to place after the filename when the file is rotated
      • setMaxBackupIndex

        public SizeRotatingFileAuditEndpoint.Builder setMaxBackupIndex​(int maxBackupIndex)
        Set the maximum number of files to backup.
        maxBackupIndex - the maximum number of files to backup
        this builder.
      • setRotateOnBoot

        public SizeRotatingFileAuditEndpoint.Builder setRotateOnBoot​(boolean rotateOnBoot)
        Set to a value of true if the file should be rotated before the a new file is set. The rotation only happens if the file names are the same and the file has a length greater than 0.
        rotateOnBoot - true to rotate on boot, otherwise false
        this builder.