We have a WildFly 18 with the following logging strategy:
<server xmlns="urn:jboss:domain:10.0">
...
<profile>
...
<subsystem xmlns="urn:jboss:domain:logging:8.0">
...
<periodic-size-rotating-file-handler name="FILE" autoflush="true">
<formatter>
<named-formatter name="PATTERN"/>
</formatter>
<file relative-to="jboss.server.log.dir" path="server.log"/>
<rotate-size value="100M"/>
<max-backup-index value="10"/>
<suffix value=".yyyy-MM-dd"/>
<append value="true"/>
</periodic-size-rotating-file-handler>
Even though we specify a periodic-size-rotating-file-handler
with a max-backup-index
, all server.log
files are kept and never removed:
What are we doing wrong here?
The max-backup-index
is only used for files not rotated by the date. See https://wildscribe.github.io/WildFly/18.0/subsystem/logging/periodic-size-rotating-file-handler/index.html. There is an old issue which asks for this ability, but it requires assumptions to be made about file names.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With