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): skip access log when enable_access_log is set to false #11310

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

flearc
Copy link
Contributor

@flearc flearc commented May 31, 2024

Description

Fixes #11309

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)

@flearc flearc changed the title fix(log-rotate): skip access log when enable_access_log is set to false WIP: fix(log-rotate): skip access log when enable_access_log is set to false May 31, 2024
@flearc flearc changed the title WIP: fix(log-rotate): skip access log when enable_access_log is set to false fix(log-rotate): skip access log when enable_access_log is set to false Jun 7, 2024
@@ -189,10 +189,8 @@ end
local function init_default_logs(logs_info, log_type)
local filepath, filename = get_log_path_info(log_type)
logs_info[log_type] = { type = log_type }
if filename ~= "off" then
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you remove this line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed, I remove it for test and forget to restore it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shreemaan-abhishek Could you please review this PR? Thank you!

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 plugin should not rotate the access log when the enable_access_log setting is set to false
2 participants