Skip to content

Add support for max compression delay in compression actions#4071

Open
ramanathan1504 wants to merge 3 commits intoapache:2.xfrom
ramanathan1504:issue-4012
Open

Add support for max compression delay in compression actions#4071
ramanathan1504 wants to merge 3 commits intoapache:2.xfrom
ramanathan1504:issue-4012

Conversation

@ramanathan1504
Copy link
Copy Markdown
Contributor

@ramanathan1504 ramanathan1504 commented Mar 19, 2026

Fixes #4012

Changes

  • Added maxCompressionDelay parameter to GzCompressAction and ZipCompressAction
  • Extended FileExtension to support max compression delay configuration
  • Updated DefaultRolloverStrategy to pass compression delay settings to compression actions
  • Added backward-compatible constructors for existing code
  • Comprehensive test coverage for compression delay functionality

Files Modified

  • Core Implementation

    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/FileExtension.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressAction.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
    • log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
  • Tests

    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/FileExtensionCompressDelayTest.java (new)
    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/GzCompressActionTest.java (new)
    • log4j-core-test/src/test/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressActionTest.java (new)

@ramanathan1504 ramanathan1504 changed the title Add support for max compression delay in compression actions [LOG4J2-4012] Add support for max compression delay in compression actions Mar 19, 2026
@vy vy changed the title [LOG4J2-4012] Add support for max compression delay in compression actions Add support for max compression delay in compression actions Apr 28, 2026
@vy vy assigned vy and ramanathan1504 and unassigned vy and ramanathan1504 Apr 29, 2026
Copy link
Copy Markdown
Member

@vy vy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramanathan1504, thanks for taking the time. See my remarks and please add a changelog entry.

TBH, I find your submission very sloppy in the sense that it appears to be generated using an LLM prompt and then without a review from your side pushed on us for review. Please, don't do this. Review your changes before asking review from others.

Comment thread src/changelog/.2.x.x/plugin_processor_min_allowed_message_kind.xml
Comment thread src/site/antora/modules/ROOT/pages/manual/plugins.adoc
@github-project-automation github-project-automation Bot moved this to Changes requested in Log4j pull request tracker Apr 29, 2026
@ramanathan1504
Copy link
Copy Markdown
Contributor Author

@ramanathan1504, thanks for taking the time. See my remarks and please add a changelog entry.

TBH, I find your submission very sloppy in the sense that it appears to be generated using an LLM prompt and then without a review from your side pushed on us for review. Please, don't do this. Review your changes before asking review from others.

ok next time i will aware about this.. i think its happened couple of time..thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Changes requested

Development

Successfully merging this pull request may close these issues.

Proactively deferring compression can reduce disk I/O pressure.

2 participants