You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "monkeyDluffy6017 (via GitHub)" <gi...@apache.org> on 2023/05/06 06:38:53 UTC

[GitHub] [apisix] monkeyDluffy6017 commented on a diff in pull request #9396: feat: route name recorded in access.log

monkeyDluffy6017 commented on code in PR #9396:
URL: https://github.com/apache/apisix/pull/9396#discussion_r1186648709


##########
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:
   The `$route_name` is not recommended, because it may be duplicated.
   We don't need to consider the apisix-dashboard project, this project is intended for beginners only and is not recommended for online environments.



-- 
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