You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "tylitianrui (via GitHub)" <gi...@apache.org> on 2023/05/04 13:33:19 UTC
[GitHub] [apisix] tylitianrui commented on a diff in pull request #9396: feat: route name recorded in access.log
tylitianrui commented on code in PR #9396:
URL: https://github.com/apache/apisix/pull/9396#discussion_r1185023400
##########
conf/config-default.yaml:
##########
@@ -195,7 +195,7 @@ nginx_config: # config for render the template to generate n
http:
enable_access_log: true # enable access log or not, default true
access_log: logs/access.log
- access_log_format: "$remote_addr - $remote_user [$time_local] $http_host \"$request\" $status $body_bytes_sent $request_time \"$http_referer\" \"$http_user_agent\" $upstream_addr $upstream_status $upstream_response_time \"$upstream_scheme://$upstream_host$upstream_uri\""
+ access_log_format: "$remote_addr - $remote_user [$time_local] $http_host \"$request\" $status $body_bytes_sent $route_name $request_time \"$http_referer\" \"$http_user_agent\" $upstream_addr $upstream_status $upstream_response_time \"$upstream_scheme://$upstream_host$upstream_uri\""
access_log_format_escape: default # allows setting json or default characters escaping in variables
Review Comment:
I partially agree.
route_id is not human-readable. it is not easy to find out the relevant route configuration by route_id in apisix-dashboard. So i think route_name is better than route_id.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org