Skip to content

fix(log-rotate): max_kept works on compression files#8366

Merged
spacewander merged 2 commits into
apache:masterfrom
tzssangglass:IssueNo8343
Nov 23, 2022
Merged

fix(log-rotate): max_kept works on compression files#8366
spacewander merged 2 commits into
apache:masterfrom
tzssangglass:IssueNo8343

Conversation

@tzssangglass

Copy link
Copy Markdown
Member

Description

Fixes #8343

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@tzssangglass
tzssangglass marked this pull request as ready for review November 21, 2022 07:57
Comment thread t/plugin/log-rotate2.t Outdated
Comment thread t/plugin/log-rotate2.t
count = count + 1
end
end
--- only two compression file, access.log.tar.gz and error.log.tar.gz

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The compression file should be named with a timestamp?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The compression file should be named with a timestamp?

The names of the compressed files actually contain timestamps, like 2022-11-22_16-50-37__access.log.tar.gz, 2022-11-22_16-50-38__error.log.tar.gz, the comment is just to indicate that only two (timestamped) compressed files remain in this test condition.

@spacewander
spacewander merged commit c49be66 into apache:master Nov 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: log-rotate max_kept doesn't work if enable_compression: true

5 participants