How to set max history log file on Quarkus?

Viewed 35

I'm building an application with Quarkus 2.7, and I'm using log files.

My quarkus log file rotation settings are as follows:

# Configure rotation.
# The maximum file size of the log file after which a rotation is executed.
quarkus.log.file.rotation.max-file-size=1M
# The maximum number of backups to keep.
quarkus.log.file.rotation.max-backup-index=10
#File handler rotation file suffix. When used, the file will be rotated based on its suffix. Example fileSuffix: .yyyy-MM-dd
quarkus.log.file.rotation.file-suffix=.yyyy-MM-dd.gz
# Indicates whether to rotate log files on server initialization. You need to either set a max-file-size or configure a file-suffix for it to work.
quarkus.log.file.rotation.rotate-on-boot=true

Is there any setting to define the maximum number of files in the folder? or to delete old files? Or perform a purge?

Spring has the following configuration:

logging.logback.rollingpolicy.max-history=20

With this configuration there are always 20 files in the logs folder. Is there something similar in quarkus?

0 Answers
Related