Skip to content
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

Merged
merged 1 commit into from
Jul 6, 2023
Merged

docs: Chinese documentation for loki-logger #9687

merged 1 commit into from
Jul 6, 2023

Conversation

mfordjody
Copy link
Contributor

@mfordjody mfordjody commented Jun 19, 2023

Description

Fixes #9676 (issue)

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@monkeyDluffy6017 monkeyDluffy6017 changed the title [docs] Chinese documentation for loki-logger docs: Chinese documentation for loki-logger Jun 20, 2023
| 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) 了解更多信息或设置你的自定义配置。
Copy link
Member

@lingsamuel lingsamuel Jun 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lingsamuel
lingsamuel previously approved these changes Jun 21, 2023
Copy link
Member

@lingsamuel lingsamuel left a 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) 了解更多信息或设置你的自定义配置。
Copy link
Member

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

Copy link
Contributor

@Neilblaze Neilblaze left a 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`。 |
Copy link
Contributor

@monkeyDluffy6017 monkeyDluffy6017 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| 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。 |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| timeout | integer | False | 3000ms | Loki 服务 HTTP 调用的超时。范围从 1 到 60,000ms。 |
| timeout | integer | False | 3000ms | Loki 服务 HTTP 请求的超时时间。范围从 1 到 60,000ms。 |

Comment on lines 47 to 54
| 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)。 |
Copy link
Contributor

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

Copy link
Contributor

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

Copy link
Contributor

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 monkeyDluffy6017 added the wait for update wait for the author's response in this issue/PR label Jun 21, 2023
@lingsamuel lingsamuel removed the wait for update wait for the author's response in this issue/PR label Jun 26, 2023
lingsamuel
lingsamuel previously approved these changes Jun 26, 2023
@lingsamuel lingsamuel added the doc Documentation things label Jun 26, 2023
@moonming
Copy link
Member

@monkeyDluffy6017 ping

@monkeyDluffy6017
Copy link
Contributor

monkeyDluffy6017 commented Jun 27, 2023

@moonming I have checked this, I don't think the translation is of high quality, maybe it's just from the translation software.
I don't have time to check every sentence

@monkeyDluffy6017
Copy link
Contributor

monkeyDluffy6017 commented Jun 28, 2023

@mfordjody Try to use the chatgpt to translate

@monkeyDluffy6017 monkeyDluffy6017 added wait for update wait for the author's response in this issue/PR and removed doc Documentation things labels Jun 29, 2023
@monkeyDluffy6017 monkeyDluffy6017 added approved wait for update wait for the author's response in this issue/PR and removed wait for update wait for the author's response in this issue/PR approved labels Jun 30, 2023
Copy link
Contributor

@monkeyDluffy6017 monkeyDluffy6017 left a 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
@monkeyDluffy6017 monkeyDluffy6017 added approved and removed wait for update wait for the author's response in this issue/PR labels Jun 30, 2023
@monkeyDluffy6017 monkeyDluffy6017 merged commit ef2a96d into apache:master Jul 6, 2023
hongbinhsu added a commit to fitphp/apix that referenced this pull request Jul 8, 2023
* 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)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

docs: create Chinese documentation for loki-logger
6 participants