How to log when response body length is less than 1k #8750
Unanswered
gaoxingliang
asked this question in
Q&A
Replies: 2 comments 5 replies
-
Hello, list of available variable are here : |
Beta Was this translation helpful? Give feedback.
0 replies
-
If your client doesn't use the chunked way to receive response body, you can check the response body size via the |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I want to log the response body in file-logger and clickhouse-logger.
but I don't know how to limit the response body length.
I tried with below ideas:
The original lua code is:
but I don't know how to do that in apisix yaml config.
below using a variable named
body_bytes_sent
. I don;t know what's the correct variable. some variables from here - https://apisix.apache.org/docs/apisix/plugins/file-logger/Any idea to NOT log the response body if it's too large?
Beta Was this translation helpful? Give feedback.
All reactions