-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
help request: log all request headers by http_logger #11337
Comments
The default log format includes the request and response headers. What's missing in your use case? |
In mycase, I am using log_format to get more information. And cannot find the variables for request's header. |
Can you paste what you get? |
yes, I am using this configuration for http_logger
And this is the log i got
|
Does none of the |
No, it is not work. I also cannot find the $req_header or $req_headers in apisix/nginx variable (https://nginx.org/en/docs/varindex.html; https://apisix.apache.org/docs/apisix/apisix-variable/) |
Did you modify the logger configuration? |
I have the same issue. I want to add additional user information, but this requires modifying the log_format. However, after modification, the headers can no longer be included. |
Description
I am using http_logger to log all requests. But cannot find any variable for request's headers.
Can someone show me hot to send request header to http-logger?
Thank you
Environment
apisix version
): 3.9.0uname -a
): Debian 11openresty -V
ornginx -V
): openresty/1.25.3.1curl http://127.0.0.1:9090/v1/server_info
):3.5.0luarocks --version
):The text was updated successfully, but these errors were encountered: