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/06 04:24:44 UTC

[GitHub] [apisix] hf400159 opened a new pull request, #7868: docs: add file-logger plugin desc

hf400159 opened a new pull request, #7868:
URL: https://github.com/apache/apisix/pull/7868

   ### Description
   
   <!-- Please include a summary of the change and which issue is fixed. -->
   <!-- Please also include relevant motivation and context. -->
   
   Fixes # (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](https://github.com/apache/apisix/tree/master#community) first)
   
   <!--
   
   Note
   
   1. Mark the PR as draft until it's ready to be reviewed.
   2. Always add/update tests for any changes unless you have a good reason.
   3. Always update the documentation to reflect the changes made in the PR.
   4. Make a new commit to resolve conversations instead of `push -f`.
   5. To resolve merge conflicts, merge master instead of rebasing.
   6. Use "request review" to notify the reviewer after making changes.
   7. Only a reviewer can mark a conversation as resolved.
   
   -->
   


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


[GitHub] [apisix] SylviaBABY merged pull request #7868: docs: add file-logger plugin desc

Posted by GitBox <gi...@apache.org>.
SylviaBABY merged PR #7868:
URL: https://github.com/apache/apisix/pull/7868


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


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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
hf400159 commented on code in PR #7868:
URL: https://github.com/apache/apisix/pull/7868#discussion_r965520160


##########
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:
   Hi, I recommend English to stay the same.



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


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

Posted by GitBox <gi...@apache.org>.
SylviaBABY commented on code in PR #7868:
URL: https://github.com/apache/apisix/pull/7868#discussion_r965419607


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