spacewander commented on code in PR #8711: URL: https://github.com/apache/apisix/pull/8711#discussion_r1098109744
########## docs/zh/latest/apisix-variable.md: ########## @@ -48,5 +48,6 @@ APISIX 除了支持 [NGINX 变量](http://nginx.org/en/docs/varindex.html)外, | service_name | core | APISIX 服务的名称。 | | | redis_cmd_line | Redis | Redis 命令的内容。 | | | rpc_time | xRPC | 在 RPC 请求级别所花费的时间。 | | +| resp_body | core | 此变量仅用于 Logger,并要求对应的 Logger 需要具备某些配置。 | | Review Comment: Please put it in alphabetical order ########## apisix/core/ctx.lua: ########## @@ -209,10 +209,14 @@ do balancer_port = true, consumer_group_id = true, consumer_name = true, + resp_body = function(ctx) + -- only for logger and requires the logger to have a special configuration + return ctx.resp_body or '' + end, route_id = true, route_name = true, service_id = true, - service_name = true, Review Comment: Why remove the comma? ########## docs/en/latest/apisix-variable.md: ########## @@ -49,5 +49,6 @@ additional variables. | service_name | core | Name of Service. | | | redis_cmd_line | Redis | The content of Redis command. | | | rpc_time | xRPC | Time spent at the rpc request level. | | +| resp_body | core | This variable is only for logger and requires the logger plugin to have a special configuration like `include_resp_body`. | | Review Comment: We should explain what this variable is, and what decides its value -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
