Open
Description
openedon May 18, 2022
Currently, Kibana's numeric log rolling strategy is applied so the most-recently-rotated file has the lowest number (kibana-1.log
) and the oldest file has the largest number (kibana-10.log
).
This means that on every log rotation, all rotated files are renamed (assuming max: 10
):
kibana-10.log
is deletedkibana-9.log
is renamed tokibana-10.log
kibana-8.log
->kibana-9.log
- ...
kibana-1.log
->kibana-2.log
kibana.log
->kibana-1.log
This matches how log4j's DefaultRolloverStrategy
works if specified the option fileIndex="min"
.
However, some folks prefer their log rotation to happen in a way that the highest number is the most recent (default DefaultRolloverStrategy
):
kibana.log
->kibana-1.log
kibana.log
->kibana-2.log
(leavingkibana-1.log
untouched)
We may also consider adding the nomax
behaviour for feature parity.
Refer to https://logging.apache.org/log4j/2.x/manual/appenders.html > Rollover Strategies for better examples of how the Rollover Strategies work in log4j.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment