-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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(core): respect custom proxy_access_log #12073
Conversation
316fd43
to
989e307
Compare
989e307
to
4df129e
Compare
4df129e
to
d03245e
Compare
b6fa973
to
e61dac3
Compare
A similar bug to #11712. |
e61dac3
to
6a03c7c
Compare
Kong now has a fixed access log format `kong_log_format` that prevents customization and error on `kong start`. Related to #11663. If the `proxy_access_log` is not a valid pathname, then replace `kong_log_format` with the custom value.
6a03c7c
to
6381b5c
Compare
kong/cmd/utils/prefix_handler.lua
Outdated
compile_env.proxy_access_log_enabled = true | ||
end | ||
if kong_proxy_access_log then | ||
-- example: 'logs/some-file.log apigw_json' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-- example: proxy_access_log = logs/some-file.log apigw_json
is it more clear?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, a couple of minor comments on the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* fix(core): respect custom proxy_access_log Kong now has a fixed access log format `kong_log_format` that prevents customization and error on `kong start`. Related to #11663. If the `proxy_access_log` is not a valid pathname, then replace `kong_log_format` with the custom value. * fix(config): cover log_format name with hyphen * fix(config): early error when access log format is not defined * fix(config): discard warning or return nil * chore(config): style and comments * chore(*): comments (cherry picked from commit 9ec3494)
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/3.4.x release/3.4.x
# Navigate to the new working tree
cd .worktrees/backport-release/3.4.x
# Create a new branch
git switch --create backport-12073-to-release/3.4.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9ec3494cb558ee03223218c7c74003f8bce3b267
# Push it to GitHub
git push --set-upstream origin backport-12073-to-release/3.4.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/3.4.x Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-release/2.8.x release/2.8.x
# Navigate to the new working tree
cd .worktrees/backport-release/2.8.x
# Create a new branch
git switch --create backport-12073-to-release/2.8.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 9ec3494cb558ee03223218c7c74003f8bce3b267
# Push it to GitHub
git push --set-upstream origin backport-12073-to-release/2.8.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-release/2.8.x Then, create a pull request where the |
* fix(core): respect custom proxy_access_log Kong now has a fixed access log format `kong_log_format` that prevents customization and error on `kong start`. Related to #11663. If the `proxy_access_log` is not a valid pathname, then replace `kong_log_format` with the custom value. * fix(config): cover log_format name with hyphen * fix(config): early error when access log format is not defined * fix(config): discard warning or return nil * chore(config): style and comments * chore(*): comments
* fix(core): respect custom proxy_access_log Kong now has a fixed access log format `kong_log_format` that prevents customization and error on `kong start`. Related to #11663. If the `proxy_access_log` is not a valid pathname, then replace `kong_log_format` with the custom value. * fix(config): cover log_format name with hyphen * fix(config): early error when access log format is not defined * fix(config): discard warning or return nil * chore(config): style and comments * chore(*): comments (cherry picked from commit 9ec3494)
* fix(core): respect custom proxy_access_log Kong now has a fixed access log format `kong_log_format` that prevents customization and error on `kong start`. Related to #11663. If the `proxy_access_log` is not a valid pathname, then replace `kong_log_format` with the custom value. * fix(config): cover log_format name with hyphen * fix(config): early error when access log format is not defined * fix(config): discard warning or return nil * chore(config): style and comments * chore(*): comments
Summary
Kong now has a fixed access log format
kong_log_format
that prevents customization. Introduced by #11663.Resolves #12061.
If the
proxy_access_log
has a log format specified, then replacekong_log_format
with the custom value.Checklist
changelog/unreleased/kong
orskip-changelog
label added on PR if changelog is unnecessary. README.mdFull changelog
kong_log_format
with custom value set by end users.Issue reference
Fix #FTI-5580