Skip to content

fix(log-rotate): should rotate logs strictly hourly(or minutely)#6521

Merged
spacewander merged 3 commits into
apache:masterfrom
snowdusk:master
Mar 16, 2022
Merged

fix(log-rotate): should rotate logs strictly hourly(or minutely)#6521
spacewander merged 3 commits into
apache:masterfrom
snowdusk:master

Conversation

@snowdusk

@snowdusk snowdusk commented Mar 7, 2022

Copy link
Copy Markdown
Contributor

What this PR does / why we need it:

Bugfix in log-rotate: log-rotate can not rotate logs strictly hourly(or minutely)

FIX #6517

Pre-submission checklist:

  • Did you explain what problem does this PR solve? Or what new features have been added?
  • Have you added corresponding test cases?
  • Have you modified the corresponding document?
  • Is this PR backward compatible? If it is not backward compatible, please discuss on the mailing list first

@spacewander
spacewander requested a review from shuaijinchao March 7, 2022 04:13
@shuaijinchao

shuaijinchao commented Mar 7, 2022

Copy link
Copy Markdown
Member

We need to add a test case.

Comment thread t/plugin/log-rotate2.t
enable_compression: true
_EOC_

$block->set_value("yaml_config", $user_yaml_config);

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.

We can check if yaml_config exists before setting it

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.

updated

@membphis membphis left a comment

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.

LGTM

@spacewander
spacewander merged commit cbd9263 into apache:master Mar 16, 2022
@lijing-21

Copy link
Copy Markdown
Contributor

Hi @snowdusk , thank you for your contribution!

Here is the Contributor T-shirt form[1], if you're interested, kindly take a look :)

[1] https://github.com/apache/apisix/blob/master/CONTRIBUTING.md#contributor-t-shirt

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 can not rotate logs strictly hourly(or minutely)

5 participants