[go: nahoru, domu]

Skip to content

Commit

Permalink
docs: fix some logger plugin metadata description (#6659)
Browse files Browse the repository at this point in the history
Co-authored-by: 高亮亮 <gll287546@alibaba-inc.com>
  • Loading branch information
liangliang4ward and 高亮亮 committed Mar 23, 2022
1 parent 9e19885 commit fb68268
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/clickhouse-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ hello, world

| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ---------------- | ------- | ------ | ------------- | ------- | ------------------------------------------------ |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)特别的**该设置是全局生效的**意味着指定 log_format 后,将对所有绑定 http-logger 的 Route 或 Service 生效。 |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)请注意**该设置是全局生效的**因此在指定 log_format 后,将对所有绑定 clickhouse-logger 的 Route 或 Service 生效。 |

### 设置日志格式示例

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/file-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ hello, world

| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ---------------- | ------- | ------ | ------------- | ------- | ------------------------------------------------ |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)特别的**该设置是全局生效的**意味着指定 log_format 后,将对所有绑定 http-logger 的 Route 或 Service 生效。 |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)请注意**该设置是全局生效的**因此在指定 log_format 后,将对所有绑定 file-logger 的 Route 或 Service 生效。 |

### 设置日志格式示例

Expand Down
2 changes: 1 addition & 1 deletion docs/zh/latest/plugins/kafka-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ hello, world

| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ---------------- | ------- | ------ | ------------- | ------- | ------------------------------------------------ |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)特别的**该设置是全局生效的**意味着指定 log_format 后,将对所有绑定 http-logger 的 Route 或 Service 生效。 |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)请注意**该设置是全局生效的**因此在指定 log_format 后,将对所有绑定 kafka-logger 的 Route 或 Service 生效。 |

### 设置日志格式示例

Expand Down
26 changes: 13 additions & 13 deletions docs/zh/latest/plugins/rocketmq-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ title: rocketmq-logger
| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ---------------- | ------- | ------ | -------------- | ------- | ------------------------------------------------ |
| nameserver_list | object | 必须 | | | 要推送的 rocketmq 的 nameserver 列表。 |
| topic | string | 必须 | | | 要推送的 topic。 |
| key | string | 可选 | | | 发送消息的keys|
| tag | string | 可选 | | | 发送消息的tags|
| topic | string | 必须 | | | 要推送的 topic |
| key | string | 可选 | | | 发送消息的 keys |
| tag | string | 可选 | | | 发送消息的 tags |
| timeout | integer | 可选 | 3 | [1,...] | 发送数据的超时时间。 |
| use_tls | boolean | 可选 | false | | 是否开启TLS加密|
| access_key | string | 可选 | "" | | ACL认证的access key,空字符串表示不开启ACL|
| secret_key | string | 可选 | "" | | ACL认证的secret key。 |
| use_tls | boolean | 可选 | false | | 是否开启 TLS 加密|
| access_key | string | 可选 | "" | | ACL认证的 access key ,空字符串表示不开启 ACL |
| secret_key | string | 可选 | "" | | ACL认证的 secret key |
| name | string | 可选 | "rocketmq logger" | | batch processor 的唯一标识。 |
| meta_format | enum | 可选 | "default" | ["default","origin"] | `default`:获取请求信息以默认的 JSON 编码方式。`origin`:获取请求信息以 HTTP 原始请求方式。[具体示例](#meta_format-参考示例)|
| include_req_body | boolean | 可选 | false | [false, true] | 是否包括请求 body。false: 表示不包含请求的 body ;true: 表示包含请求的 body。注意:如果请求 body 没办法完全放在内存中,由于 Nginx 的限制,我们没有办法把它记录下来。|
| include_req_body_expr | array | 可选 | | |`include_req_body` 开启时, 基于 [lua-resty-expr](https://github.com/api7/lua-resty-expr) 表达式的结果进行记录。如果该选项存在,只有在表达式为真的时候才会记录请求 body。 |
| include_resp_body| boolean | 可选 | false | [false, true] | 是否包括响应体。包含响应体,当为`true`|
| include_resp_body_expr | array | 可选 | | | 是否采集响体, 基于[lua-resty-expr](https://github.com/api7/lua-resty-expr)。 该选项需要开启 `include_resp_body`|
| include_req_body | boolean | 可选 | false | [false, true] | 是否包括请求 body 。false : 表示不包含请求的 body ;true : 表示包含请求的 body 。注意:如果请求 body 没办法完全放在内存中,由于 Nginx 的限制,我们没有办法把它记录下来。|
| include_req_body_expr | array | 可选 | | |`include_req_body` 开启时, 基于 [lua-resty-expr](https://github.com/api7/lua-resty-expr) 表达式的结果进行记录。如果该选项存在,只有在表达式为真的时候才会记录请求 body |
| include_resp_body| boolean | 可选 | false | [false, true] | 是否包括响应体。包含响应体,当为 `true` |
| include_resp_body_expr | array | 可选 | | | 是否采集响体, 基于[lua-resty-expr](https://github.com/api7/lua-resty-expr)。 该选项需要开启 `include_resp_body` |

本插件支持使用批处理器来聚合并批量处理条目(日志/数据)。这样可以避免插件频繁地提交数据,默认设置情况下批处理器会每 `5` 秒钟或队列中的数据达到 `1000` 条时提交数据,如需了解或自定义批处理器相关参数设置,请参考 [Batch-Processor](../batch-processor.md#配置) 配置部分。

Expand Down Expand Up @@ -113,8 +113,8 @@ title: rocketmq-logger
当缓冲区超过 `batch_max_size` 时,它将发送到 rocketmq 服务器,
或每个 `buffer_duration` 刷新缓冲区。

如果成功,则返回 `true`
如果出现错误,则返回 `nil`,并带有描述错误的字符串(`buffer overflow`)。
如果成功,则返回 `true`
如果出现错误,则返回 `nil` ,并带有描述错误的字符串(`buffer overflow`)。

### Nameserver 列表

Expand Down Expand Up @@ -165,7 +165,7 @@ hello, world

| 名称 | 类型 | 必选项 | 默认值 | 有效值 | 描述 |
| ---------------- | ------- | ------ | ------------- | ------- | ------------------------------------------------ |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)特别的**该设置是全局生效的**意味着指定 log_format 后,将对所有绑定 http-logger 的 Route 或 Service 生效。 |
| log_format | object | 可选 | {"host": "$host", "@timestamp": "$time_iso8601", "client_ip": "$remote_addr"} | | 以 JSON 格式的键值对来声明日志格式。对于值部分,仅支持字符串。如果是以 `$` 开头,则表明是要获取 [APISIX 变量](../../../en/latest/apisix-variable.md)[Nginx 内置变量](http://nginx.org/en/docs/varindex.html)请注意**该设置是全局生效的**因此在指定 log_format 后,将对所有绑定 rocketmq-logger 的 Route 或 Service 生效。 |

### 设置日志格式示例

Expand Down
6 changes: 3 additions & 3 deletions docs/zh/latest/plugins/skywalking-logger.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ title: skywalking-logger

## 描述

`http-logger` 是一个插件,可将 Access Log 数据通过 `HTTP` 推送到 SkyWalking OAP 服务器。如果上下文中存在 `tracing context`,插件会自动建立 `trace` 与日志的关联,并依赖于 [SkyWalking Cross Process Propagation Headers Protocol](https://skywalking.apache.org/docs/main/latest/en/protocols/skywalking-cross-process-propagation-headers-protocol-v3/)
`skywalking-logger` 是一个插件,可将 Access Log 数据通过 `HTTP` 推送到 SkyWalking OAP 服务器。如果上下文中存在 `tracing context`,插件会自动建立 `trace` 与日志的关联,并依赖于 [SkyWalking Cross Process Propagation Headers Protocol](https://skywalking.apache.org/docs/main/latest/en/protocols/skywalking-cross-process-propagation-headers-protocol-v3/)

这将提供将 Access Log 数据作为JSON对象发送到 SkyWalking OAP 服务器的功能。
这将提供将 Access Log 数据作为 JSON 对象发送到 SkyWalking OAP 服务器的功能。

## 属性

Expand Down Expand Up @@ -87,7 +87,7 @@ hello, world

## 禁用插件

在插件配置中删除相应的 json 配置以禁用 skywalking-logger。APISIX 插件是热重载的,因此无需重新启动 APISIX:
在插件配置中删除相应的 json 配置以禁用 skywalking-logger。APISIX 插件是热重载的,因此无需重新启动 APISIX

```shell
$ curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
Expand Down

0 comments on commit fb68268

Please sign in to comment.