yuanrui01 commented on PR #12173:
URL: https://github.com/apache/apisix/pull/12173#issuecomment-2833176028

   > > I can add these two properties directly under the plugin to take effect 
as well.
   > 
   > Did you verify that the function is normal?
   > 
   > In order for the plugin to support this capability, we need to provide 
some code and tests for the plugin, you can refer to #11133
   
   Yes, it works. In fact, that was my original need, at first I was trying to 
control the size logging via include_req_body_expr and include_resp_body_expr, 
then realized I couldn't do it, so I went through the code for a while and 
found these two lovely attributes. I upgraded the version from 3.3 to 3.12 then 
turned on show specified size and the size could be truncated.
   
   Basically, 
   config: "plugins": { "rocketmq-logger": { ... "max_resp_body_bytes" : 30, 
"max_req_body_bytes ": 30} }
   and i got the message's resposne body like this
   <img width="1046" alt="truncate" 
src="https://github.com/user-attachments/assets/b5879cf0-fa4b-4cd8-8d7b-bf6d66cbedb0";
 />
   
   


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