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 2020/09/21 08:22:20 UTC
[GitHub] [apisix] membphis opened a new pull request #2269: feat: support `json` encoding escape for access logs
membphis opened a new pull request #2269:
URL: https://github.com/apache/apisix/pull/2269
fix #2266 .
### What this PR does / why we need it:
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->
issue: #2266
### Pre-submission checklist:
* [ ] Did you explain what problem does this PR solve? Or what new features have been added?
* [ ] Have you added corresponding test cases?
* [ ] Have you modified the corresponding document?
* [ ] Is this PR backward compatible?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] gxthrj commented on a change in pull request #2269: feat: support `json` encoding escape for access logs
Posted by GitBox <gi...@apache.org>.
gxthrj commented on a change in pull request #2269:
URL: https://github.com/apache/apisix/pull/2269#discussion_r491868003
##########
File path: .travis/apisix_cli_test.sh
##########
@@ -268,3 +268,34 @@ fi
git checkout conf/config.yaml
echo "passed: worker_processes number is configurable"
+
+# access log with JSON format
+
+echo '
+nginx_config:
+ http:
+ access_log_format: |-
+ {"@timestamp": "$time_iso8601", "client_ip": "$remote_addr", "status": "$status"}
+ access_log_format_escape: json
+' > conf/config.yaml
Review comment:
how about use `>>` instead of `>`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] gxthrj commented on a change in pull request #2269: feat: support `json` encoding escape for access logs
Posted by GitBox <gi...@apache.org>.
gxthrj commented on a change in pull request #2269:
URL: https://github.com/apache/apisix/pull/2269#discussion_r491868003
##########
File path: .travis/apisix_cli_test.sh
##########
@@ -268,3 +268,34 @@ fi
git checkout conf/config.yaml
echo "passed: worker_processes number is configurable"
+
+# access log with JSON format
+
+echo '
+nginx_config:
+ http:
+ access_log_format: |-
+ {"@timestamp": "$time_iso8601", "client_ip": "$remote_addr", "status": "$status"}
+ access_log_format_escape: json
+' > conf/config.yaml
Review comment:
how about use `>>` instead of `>`
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] membphis merged pull request #2269: feat: support `json` encoding escape for access logs
Posted by GitBox <gi...@apache.org>.
membphis merged pull request #2269:
URL: https://github.com/apache/apisix/pull/2269
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org