You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by me...@apache.org on 2021/06/18 10:23:42 UTC
[apisix] branch master updated: docs: use mockbin to view http logs
for guidance (#4427)
This is an automated email from the ASF dual-hosted git repository.
membphis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git
The following commit(s) were added to refs/heads/master by this push:
new bf90cbe docs: use mockbin to view http logs for guidance (#4427)
bf90cbe is described below
commit bf90cbe81e601591953b9a04166bdc86b50118d8
Author: Shuyang Wu <wo...@gmail.com>
AuthorDate: Fri Jun 18 06:23:37 2021 -0400
docs: use mockbin to view http logs for guidance (#4427)
Co-authored-by: 罗泽轩 <sp...@gmail.com>
---
docs/en/latest/plugins/http-logger.md | 4 ++--
docs/zh/latest/plugins/http-logger.md | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/en/latest/plugins/http-logger.md b/docs/en/latest/plugins/http-logger.md
index 84bc743..104452c 100644
--- a/docs/en/latest/plugins/http-logger.md
+++ b/docs/en/latest/plugins/http-logger.md
@@ -54,14 +54,14 @@ This will provide the ability to send Log data requests as JSON objects to Monit
## How To Enable
-The following is an example on how to enable the http-logger for a specific route.
+The following is an example of how to enable the `http-logger` for a specific route. You could generate a mock HTTP server at [mockbin](http://mockbin.org/bin/create) to view the logs.
```shell
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"plugins": {
"http-logger": {
- "uri": "http://127.0.0.1:80/postendpoint?param=1"
+ "uri": "http://mockbin.org/bin/:ID"
}
},
"upstream": {
diff --git a/docs/zh/latest/plugins/http-logger.md b/docs/zh/latest/plugins/http-logger.md
index 3120177..811c9d0 100644
--- a/docs/zh/latest/plugins/http-logger.md
+++ b/docs/zh/latest/plugins/http-logger.md
@@ -54,14 +54,14 @@ title: http-logger
## 如何开启
-这是有关如何为特定路由启用 http-logger 插件的示例。
+这是有关如何为特定路由启用 `http-logger` 插件的示例。你可以在 [mockbin](http://mockbin.org/bin/create) 生成一个模拟 HTTP 服务器来浏览生成的日志
```shell
curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
{
"plugins": {
"http-logger": {
- "uri": "http://127.0.0.1:80/postendpoint?param=1"
+ "uri": "http://mockbin.org/bin/:ID"
}
},
"upstream": {