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 2022/09/08 01:20:18 UTC

[GitHub] [apisix] SylviaBABY commented on a diff in pull request #7868: docs: add file-logger plugin desc

SylviaBABY commented on code in PR #7868:
URL: https://github.com/apache/apisix/pull/7868#discussion_r965419232


##########
docs/zh/latest/plugins/file-logger.md:
##########
@@ -31,6 +31,16 @@ description: API 网关 Apache APISIX file-logger 插件可用于将日志数据
 
 `file-logger` 插件可用于将日志数据存储到指定位置。
 
+:::tip 提示
+

Review Comment:
   ```suggestion
   
   `file-logger` 插件特点如下:
   
   ```



##########
docs/en/latest/plugins/file-logger.md:
##########
@@ -31,6 +31,16 @@ description: This document contains information about the Apache APISIX file-log
 
 The `file-logger` Plugin is used to push log streams to a specific location.
 
+:::tip
+
+- `file-logger` plugin can count request and response data for individual routes locally, which is useful for [debugging](../debug-mode.md).
+- `file-logger` plugin can get [APISIX variables](../apisix-variable.md) and [NGINX variables](http://nginx.org/en/docs/varindex.html), while `access.log` can only use NGINX variables.
+- `file-logger` plugin support hot-loaded so that we can change its configuration at any time with immediate effect.
+- `file-logger` plugin saves every data in JSON format.
+- The user can modify the functions executed by the `file-logger` during the `log phase` to collect the information they want.
+
+:::
+

Review Comment:
   Reference Chinese modification



##########
docs/zh/latest/plugins/file-logger.md:
##########
@@ -31,6 +31,16 @@ description: API 网关 Apache APISIX file-logger 插件可用于将日志数据
 
 `file-logger` 插件可用于将日志数据存储到指定位置。
 
+:::tip 提示
+
+- `file-logger` 插件的主要作用是将指定路由的日志发送到指定位置,方便你在本地统计各个路由的请求和响应数据。在使用 [debug mode](../../../en/latest/debug-mode.md) 时,你可以很轻松的将出现问题的路由的日志输出到指定文件中,从而更方便的排查问题。
+- `file-logger` 插件可以获取 [APISIX 变量](../../../en/latest/apisix-variable.md)和 [NGINX 变量](http://nginx.org/en/docs/varindex.html),而 `access.log` 仅能使用 NGINX 变量。
+- `file-logger` 插件支持热加载,你可以在路由中随时更改其配置并立即生效。而修改 `access.log` 相关配置,则需要重新加载 APISIX。
+- `file-logger` 插件支持以 JSON 格式保存日志数据。
+- 你可以在 `log phase` 阶段修改 `file-logger` 执行的函数来收集你所需要的信息。

Review Comment:
   ```suggestion
   - 可将指定路由的日志发送到指定位置,方便你在本地统计各个路由的请求和响应数据。在使用 [debug mode](../../../en/latest/debug-mode.md) 时,你可以很轻松地将出现问题的路由的日志输出到指定文件中,从而更方便地排查问题。
   - 可以获取 [APISIX 变量](../../../en/latest/apisix-variable.md)和 [NGINX 变量](http://nginx.org/en/docs/varindex.html),而 `access.log` 仅能使用 NGINX 变量。
   - 支持热加载,你可以在路由中随时更改其配置并立即生效。而修改 `access.log` 相关配置,则需要重新加载 APISIX。
   - 支持以 JSON 格式保存日志数据。
   - 你可以在 `log phase` 阶段修改 `file-logger` 执行的函数来收集你所需要的信息。
   ```



-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org