Earlier in issue #17566 you were pointed out that the description of the logging.file.max-history setting was incorrect. Next, in issue #17567, you edited the comment for this parameter in the code. Replaced "Maximum of archive log files to keep" with "Maximum of retention days the log archive log files to keep".

But in the current version, the description is again incorrect: https://github.com/spring-projects/spring-boot/blob/c600be74ff05d912fd3c48b5eae9056d401f1e2d/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json

    {
      "name": "logging.file.max-history",
      "type": "java.lang.Integer",
      "description": "Maximum number of archive log files to keep. Only supported with the default logback setup.",
      "sourceType": "org.springframework.boot.context.logging.LoggingApplicationListener",
      "defaultValue": 7,
      "deprecation": {
        "replacement": "logging.logback.rollingpolicy.max-history"
      }
    }

Please correct the description in the code, and desirable in your documentation (https://docs.spring.io/spring-boot), because it is misleading.

Comment From: wilkinsona

It was changed back in https://github.com/spring-projects/spring-boot/pull/28448. logging.file.max-history is applied to the maxHistory of a SizeAndTimeBasedRollingPolicy. This setting is described as "the maximum number of archive files to keep" so the current documentation appears to be correct. Thanks anyway for the suggestion.

Comment From: avkomarova

@wilkinsona However, testing shows that this option allows you to store more files than it is set. It affects exactly how many days the log archives are stored for.

Comment From: wilkinsona

That should be reported to the Logback project. If they make an update to their documentation and/or javadoc we would then update Spring Boot to match.

Comment From: uli-f

I can confirm that the setting logging.logback.rollingpolicy.max-history does not limit the number of archive log files as described in the documentation.

@avkomarova Did you raise an issue with the Logback project as suggested by @wilkinsona ?