tokers commented on code in PR #8711:
URL: https://github.com/apache/apisix/pull/8711#discussion_r1089908337


##########
apisix/plugins/file-logger.lua:
##########
@@ -59,6 +59,9 @@ local _M = {
     metadata_schema = metadata_schema
 }
 
+core.ctx.register_var("resp_body", function(ctx)

Review Comment:
   Not only one logger plugin will support recording the response body. 
`file-logger.lua` is not an appropriate place.



##########
docs/en/latest/plugins/file-logger.md:
##########
@@ -43,10 +43,10 @@ The `file-logger` Plugin is used to push log streams to a 
specific location.
 
 ## Attributes
 
-| Name | Type   | Required | Description   |
-| ---- | ------ | -------- | ------------- |
+| Name | Type   | Required | Description                                       
                                                                                
                                                                                
                 |
+| ---- | ------ | -------- 
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
 | path | string | True     | Log file path. |
-| include_resp_body      | boolean | False     | When set to `true` includes 
the response body in the log file.                                              
                                                                                
                                  |
+| include_resp_body      | boolean | False     | When set to `true` includes 
the response body in the log file. If format is set, you can use the variable 
$resp_body to get the response body.                                            
                                         |

Review Comment:
   +1.



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

Reply via email to