Keycloak log rotation not cleaning up old log files

122 views
Skip to first unread message

zam...@gmail.com

unread,
Jul 18, 2025, 10:15:39 AM7/18/25
to Keycloak User
I am using Keycloak 26.2.5 and have set up log rotation as following:

in /conf/keycloak.conf I have

log-level=INFO
log=console,file
log-file=/var/log/keycloak/keycloak.log


and in conf/quarkus.properties I have following:

quarkus.log.file.rotation.max-file-size=10M
quarkus.log.file.rotation.max-backup-index=7
quarkus.log.file.rotation.file-suffix=.yyyy-MM-dd
quarkus.log.file.rotation.rotate-on-boot=true


I can see new log files being generated, however there are more than 7 (many more!)
So they are not being removed... I even tried restarting Keycloak but old files still were not being removed
I also made sure that same user and group that runs Keycloak service owns the /var/log/keycloak folder and all the log files...

Does anyone know if I am missing something?

Thanks
Z...




Reply all
Reply to author
Forward
0 new messages