You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "soulbird (via GitHub)" <gi...@apache.org> on 2023/05/04 01:46:30 UTC
[GitHub] [apisix] soulbird commented on a diff in pull request #9396: feat: route name recorded in access.log
soulbird commented on code in PR #9396:
URL: https://github.com/apache/apisix/pull/9396#discussion_r1184464169
##########
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:
Modifying the default log format will introduce a new break change, and not everyone needs to log route_name, as far as I know, most people use route_id
So I think you can add this variable and then use it in your own config.yaml
--
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