Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Nov 23, 2022

Conversation

tzssangglass
Copy link
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
t/plugin/log-rotate2.t Outdated Show resolved Hide resolved
count = count + 1
end
end
--- only two compression file, access.log.tar.gz and error.log.tar.gz
Copy link
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
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