You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/25 04:10:02 UTC
[GitHub] [apisix] imiskolee opened a new issue, #7124: bug: nginx.stream.access_log_format can not work.
imiskolee opened a new issue, #7124:
URL: https://github.com/apache/apisix/issues/7124
### Current Behavior
current config.yaml
```yaml
apisix:
admin_key:
- name: admin
key: ***********
role: admin
allow_admin:
- 0.0.0.0/0
router:
http: "radixtree_uri_with_parameter"
ssl:
fallback_sni: "*******"
etcd:
host:
- "http://************:2379"
nginx_config:
stream:
enable_access_log: true
access_log: /dev/stdout
access_log_format: "{\"remote_addr\":\"$remote_addr\",\"time\":\"$time_local\",\"request_time\":\"$request_time\",\"host\": \"$host\",\"request\":\"$request\",\"status\":\"$status\",\"content_length\":\"$content_length\",\"body_bytes_sent\":\"$body_bytes_sent\",\"http_referer\":\"$http_referer\",\"http_user_agent\":\"$http_user_agent\",\"upstream_addr\":\"$upstream_addr\",\"response_time\":\"$upstream_response_time\",\"upstream_scheme\":\"$upstream_host$upstream_uri\",\"service_name\":\"$service_name\",\"router_name\":\"$route_name\",\"request_body\":\"$request_body\"}"
```
but the access log on /dev/stdout still :
```
100.125.67.146 - - [25/May/2022:03:45:50 +0000] ********* "GET /version HTTP/2.0" 200 101 0.004 "-" "curl/7.79.1" 10.247.178.85:80 200 0.001 "http://***********"
```
### Expected Behavior
i think the output format need to follow the config.yaml as a JSON
### Error Logs
_No response_
### Steps to Reproduce
see Current Behavior
### Environment
docker image: 2.13.1-alpine
--
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: notifications-unsubscribe@apisix.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] imiskolee commented on issue #7124: bug: nginx.stream.access_log_format can not work.
Posted by GitBox <gi...@apache.org>.
imiskolee commented on issue #7124:
URL: https://github.com/apache/apisix/issues/7124#issuecomment-1136878536
@spacewander I just follow that default conf file https://apache.googlesource.com/apisix/+/HEAD/conf/config-default.yaml, how to let http access log work ?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #7124: bug: nginx.stream.access_log_format can not work.
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7124:
URL: https://github.com/apache/apisix/issues/7124#issuecomment-1138063001
It should be
https://github.com/apache/apisix/blob/6063f334098a93e10d603c156ea7d9a217e95f62/conf/config-default.yaml#L216-L219
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] imiskolee closed issue #7124: bug: nginx.stream.access_log_format can not work.
Posted by GitBox <gi...@apache.org>.
imiskolee closed issue #7124: bug: nginx.stream.access_log_format can not work.
URL: https://github.com/apache/apisix/issues/7124
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #7124: bug: nginx.stream.access_log_format can not work.
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7124:
URL: https://github.com/apache/apisix/issues/7124#issuecomment-1136759077
```
100.125.67.146 - - [25/May/2022:03:45:50 +0000] ********* "GET /version HTTP/2.0" 200 101 0.004 "-" "curl/7.79.1" 10.247.178.85:80 200 0.001 "http://***********"
```
The log you paste is from an HTTP request, not from a TCP one. But your configuration is for the TCP part.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org