-
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
docs: Chinese documentation for loki-logger #9687
Conversation
| include_resp_body | boolean | False | false | 当设置为 `true` 时,在日志中包括响应体。 | | ||
| include_resp_body_expr | array | False | | 当 `include_resp_body` 属性被设置为 `true` 时的过滤器。只有当这里设置的表达式评估为 `true` 时,才会记录响应体。更多信息请参见 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 | | ||
|
||
这个插件支持使用批处理程序来聚集和处理条目(日志/数据)的批次。这避免了频繁提交数据的需要。批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。参见 [批处理程序](../batch-processor.md#configuration) 了解更多信息或设置你的自定义配置。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use term 批处理器
(ref: https://github.com/apache/apisix/blob/master/docs/zh/latest/batch-processor.md)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a small change is needed
| include_resp_body | boolean | False | false | 当设置为 `true` 时,在日志中包括响应体。 | | ||
| include_resp_body_expr | array | False | | 当 `include_resp_body` 属性被设置为 `true` 时的过滤器。只有当这里设置的表达式评估为 `true` 时,才会记录响应体。更多信息请参见 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 | | ||
|
||
这个插件支持使用批处理器来聚集和处理条目(日志/数据)的批次。这避免了频繁提交数据的需要。批处理程序每 `5` 秒或当队列中的数据达到 `1000` 时提交数据。参见 [批处理程序](../batch-processor.md#configuration) 了解更多信息或设置你的自定义配置。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last 批处理程序
need to be changed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM!
| endpoint_addrs | array[string] | True | | Loki API 基础 URL,格式如 http://127.0.0.1:3100,支持 HTTPS 和域名。如果配置了多个端点,它们将被随机写入。 | | ||
| endpoint_uri | string | False | /loki/api/v1/push | 如果你使用与 Loki Push API 兼容的日志收集服务,你可以使用这个配置项来定制 API 路径。 | | ||
| tenant_id | string | False | fake | Loki 租户 ID。根据 Loki 的 [多租户文档](https://grafana.com/docs/loki/latest/operations/multi-tenancy/#multi-tenancy),其默认值被设置为单租户下的默认值 `fake`。 | | ||
| log_labels | object | False | {job = "apisix"} | Loki 日志标签。[APISIX 变量](../apisix-variable.md) 和 [Nginx 变量](http://nginx.org/en/docs/varindex.html) 可以通过在字符串前加上 `$` 来使用,包括单独和组合,如 `$host` 或 `$remote_addr:$remote_port`。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| log_labels | object | False | {job = "apisix"} | Loki 日志标签。[APISIX 变量](../apisix-variable.md) 和 [Nginx 变量](http://nginx.org/en/docs/varindex.html) 可以通过在字符串前加上 `$` 来使用,包括单独和组合,如 `$host` 或 `$remote_addr:$remote_port`。 | | |
| log_labels | object | False | {job = "apisix"} | Loki 日志标签。[APISIX 变量](../apisix-variable.md) 和 [Nginx 变量](http://nginx.org/en/docs/varindex.html) 可以通过在字符串前加上 `$` 来单独或者组合使用,如 `$host` 或 `$remote_addr:$remote_port`。 | |
| tenant_id | string | False | fake | Loki 租户 ID。根据 Loki 的 [多租户文档](https://grafana.com/docs/loki/latest/operations/multi-tenancy/#multi-tenancy),其默认值被设置为单租户下的默认值 `fake`。 | | ||
| log_labels | object | False | {job = "apisix"} | Loki 日志标签。[APISIX 变量](../apisix-variable.md) 和 [Nginx 变量](http://nginx.org/en/docs/varindex.html) 可以通过在字符串前加上 `$` 来使用,包括单独和组合,如 `$host` 或 `$remote_addr:$remote_port`。 | | ||
| ssl_verify | boolean | False | true | 当设置为 `true` 时,验证 SSL 证书。| | ||
| timeout | integer | False | 3000ms | Loki 服务 HTTP 调用的超时。范围从 1 到 60,000ms。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| timeout | integer | False | 3000ms | Loki 服务 HTTP 调用的超时。范围从 1 到 60,000ms。 | | |
| timeout | integer | False | 3000ms | Loki 服务 HTTP 请求的超时时间。范围从 1 到 60,000ms。 | |
| keepalive | boolean | False | true | 当设置为 `true` 时,为多个请求保持连接。 | | ||
| keepalive_timeout | integer | False | 60000ms | 空闲时间之后连接被关闭。大于或等于 1000ms 的范围。 | | ||
| keepalive_pool | integer | False | 5 | 连接池限制。大于或等于 1 的范围。 | | ||
| log_format | object | False | | 日志格式以 JSON 格式的键值对声明。值只支持字符串。[APISIX 变量](../apisix-variable.md) 和 [Nginx 变量](http://nginx.org/en/docs/varindex.html) 可以通过在字符串前加上 `$` 来使用。 | | ||
| include_req_body | boolean | False | false | 当设置为 `true` 时,在日志中包括请求正文。如果请求正文太大,不能保存在内存中,由于 Nginx 的限制,它不能被记录下来。 | | ||
| include_req_body_expr | array | False | | 当 `include_req_body` 属性被设置为 `true` 时的过滤器。只有当这里设置的表达式评估为 `true` 时,才会记录请求正文。更多信息请参见 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 | | ||
| include_resp_body | boolean | False | false | 当设置为 `true` 时,在日志中包括响应体。 | | ||
| include_resp_body_expr | array | False | | 当 `include_resp_body` 属性被设置为 `true` 时的过滤器。只有当这里设置的表达式评估为 `true` 时,才会记录响应体。更多信息请参见 [lua-resty-expr](https://github.com/api7/lua-resty-expr)。 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please read it yourself first, don't rely on translation software
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@monkeyDluffy6017 Would you mind recommending one for ZH
to EN
? I generally use DeepL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I use DeepL and chatgpt, but i found that chatgpt is better
@monkeyDluffy6017 ping |
@moonming I have checked this, I don't think the translation is of high quality, maybe it's just from the translation software. |
@mfordjody Try to use the chatgpt to translate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix the lint error
change error change error change typos change typos change document change document Update Document Update Document Update Document
* upstream/master: (70 commits) fix(workflow): enhance schema check (apache#9782) docs: add chinese documentation for loki-logger (apache#9687) chore(update): stand-alone text (apache#9736) docs: add Secret chinese document to Admin API (apache#9522) fix(log-rotate): can not keep max files when using custom name (apache#9749) docs: fix typo and added useful information (apache#8900) docs: explain in more details for the batch-requests plugin (apache#9629) docs: update `apisix` section in `config-default.yaml` (apache#9611) chore: add missing `report_interval` option for `skywalking` plugin in `config-default.yaml` (apache#9662) refactor(jwt-auth): remove unused parameter (apache#9716) change(request-id): remove snowflake algorithm (apache#9715) fix test case (apache#9706) docs: add correct link for openresty arm64 repo (apache#9713) fix: get the correct revision (apache#9635) fix(body-transformer): xml2lua: replace empty table with empty string (apache#9669) feat(prometheus): allow user configure DEFAULT_BUCKETS (apache#9673) docs: add example for timeout (apache#9708) docs: replace some urls that point to github with relative paths (apache#9684) docs: update Debian Installation Guide (apache#9680) docs: update how to install apisix on debian (apache#9693) ...
Description
Fixes #9676 (issue)
Checklist