[Logging] Add reverse numeric rolling strategy #132403
Labels
enhancement
New value added to drive a business result
Feature:Logging
Team:Core
Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
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 optionfileIndex="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.
The text was updated successfully, but these errors were encountered: