This is an automated email from the ASF dual-hosted git repository.
xiaoyu pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-shenyu-website.git
The following commit(s) were added to refs/heads/main by this push:
new c206c8c11c [type:optimize] optimize loggingConsole plugin document
(#570)
c206c8c11c is described below
commit c206c8c11cc26faeb41f59b87a91e1121eabdfa5
Author: moremind <[email protected]>
AuthorDate: Tue May 17 11:54:18 2022 +0800
[type:optimize] optimize loggingConsole plugin document (#570)
* [type:optimize] optimize loggingConsole plugin document
* [type:optimize] update loggingConsole document
---
docs/plugin-center/observability/logging-plugin.md | 119 +++++++++++++++++----
.../plugin-center/observability/logging-plugin.md | 114 ++++++++++++++++----
.../plugin-center/observability/logging-plugin.md | 114 ++++++++++++++++----
.../plugin-center/observability/logging-plugin.md | 114 ++++++++++++++++----
.../plugin-center/observability/logging-plugin.md | 114 ++++++++++++++++----
.../plugin-center/observability/logging-plugin.md | 114 ++++++++++++++++----
.../logging/logging-console/call-service.png | Bin 0 -> 26557 bytes
.../plugin/logging/logging-console/log-rule-en.jpg | Bin 0 -> 77617 bytes
.../plugin/logging/logging-console/log-rule-zh.jpg | Bin 0 -> 70871 bytes
.../logging/logging-console/log-selector-en.jpg | Bin 0 -> 69384 bytes
.../logging/logging-console/log-selector-zh.jpg | Bin 0 -> 66823 bytes
.../plugin/logging/logging-console/logging-en.jpg | Bin 0 -> 128970 bytes
.../plugin/logging/logging-console/logging-zh.jpg | Bin 0 -> 117338 bytes
.../logging-console/loggingConsole-use-en.png | Bin 0 -> 16147 bytes
.../logging-console/loggingConsole-use-zh.jpg | Bin 0 -> 16770 bytes
.../logging-console/unenable-log-plugin-en.jpg | Bin 0 -> 127261 bytes
.../logging-console/unenable-log-plugin-zh.jpg | Bin 0 -> 115104 bytes
.../plugin-center/observability/logging-plugin.md | 119 ++++++++++++++++++---
.../plugin-center/observability/logging-plugin.md | 119 ++++++++++++++++++---
.../plugin-center/observability/logging-plugin.md | 119 ++++++++++++++++++---
.../plugin-center/observability/logging-plugin.md | 119 +++++++++++++++++----
21 files changed, 988 insertions(+), 177 deletions(-)
diff --git a/docs/plugin-center/observability/logging-plugin.md
b/docs/plugin-center/observability/logging-plugin.md
index c50f0d2fca..aea7f4655e 100644
--- a/docs/plugin-center/observability/logging-plugin.md
+++ b/docs/plugin-center/observability/logging-plugin.md
@@ -4,31 +4,114 @@ keywords: ["logging"]
description: logging plugin
---
-## Description
+# 1. Overview
-* When making invokes to the target service, Apache ShenYu gateway also allows
users to print the request information in the log that includes the request
path, request method, request parameters, response header, response body ...etc.
+## 1.1 Plugin Name
-## Plugin Setting
+* Logging-Console Plugin
-* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
-* If the user don't use, please disable the plugin in the background.
- <img src="/img/shenyu/plugin/logging/logging_open_en.png" width="70%"
height="60%" />
+## 1.2 Appropriate Scenario
-* Introduce `logging` support in the pox.xml file of the gateway.
+* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+
+## 1.3 Plugin functionality
+
+* Collect http request url, header, request body, response and response body
by logback or log4j, the log file will be saved locally.
+
+## 1.4 Plugin code
+
+* Core Module `shenyu-pluign-logging-console`.
+
+* Core Class `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 Added Since Which shenyu version
+
+* Since shenyu 2.4.0
+
+# 2. How to use plugin
+
+## 2.1 Plugin-use procedure chart
+
+
+
+## 2.2 Import pom
+
+- import maven config in shenyu-bootstrap project's `pom.xml` file.
```xml
- <!-- apache shenyu logging plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu logging plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* Selectors and rules, please refer to: [Selector And Rule
Config](../../user-guide/admin-usage/selector-and-rule)。
-* Only those matched requests can print the information about this request.
+## 2.3 Enable plugin
-## Situation
+- In shenyu-admin --> BasicConfig --> Plugin --> loggingConsole set Status
enable.
-* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+## 2.4 Config plugin
+
+* Selector and rule Config. Please refer: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 Examples
+
+## 2.5.1 Collect all http request log
+
+> you must open loggingConsole plugin before you use loggingConsole plugin.
+
+### 2.5.1.1 Selctor Configuration
+
+
+
+### 2.5.1.2 Rule Configuration
+
+
+
+### 2.5.1.3 Call Http Service
+
+
+
+### 2.5.1.4 Check Result
+
+if the request arrived successfully, you will see request information as
follow.
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. How to disable plugin
+
+- In `shenyu-admin` --> BasicConfig --> Plugin --> `loggingConsole` set Status
disable.
+
+
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/current/plugin-center/observability/logging-plugin.md
b/i18n/zh/docusaurus-plugin-content-docs/current/plugin-center/observability/logging-plugin.md
index a45d8dd2d4..c387bd8430 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/current/plugin-center/observability/logging-plugin.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/current/plugin-center/observability/logging-plugin.md
@@ -4,36 +4,114 @@ keywords: ["logging"]
description: logging插件
---
-## 说明
+# 1. 概述
-* `Apache ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging`
插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+## 1.1 插件名称
-## 插件设置
+* 请求日志记录插件
-* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+## 1.2 适用场景
-* 如果用户不需要,可以把插件禁用。
+* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+
+## 1.3 插件功能
+
+* 通过logback或者log4j收集请求的url,请求头,请求体,响应信息和响应体,并将请求信息存储在本地。
+
+## 1.4 插件代码
+
+* 核心模块 `shenyu-pluign-logging-console`.
+
+* 核心类 `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 添加自哪个shenyu版本
+
+* ShenYu 2.4.0
+# 2. 如何使用插件
-<img src="/img/shenyu/plugin/logging/logging_open.png" width="70%"
height="60%" />
+## 2.1 插件使用流程图
+
-* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+## 2.2 导入pom
+- 在ShenYu-Bootstrap导入对应的pom依赖。
```xml
- <!-- apache shenyu debug plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu debug plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* 选择器和规则配置,请参考: [选择器和规则管理](../../user-guide/admin-usage/selector-and-rule)。
-* 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
+## 2.3 启用插件
-## 场景
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为开启。
-* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+## 2.4 配置插件
+
+* 插件和选择器配置。请查看: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 示例
+
+## 2.5.1 收集http请求信息
+
+> 在你使用日志之前请在`ShenYuAdmin`开启日志插件.
+
+### 2.5.1.1 选择器配置
+
+
+
+### 2.5.1.2 规则配置
+
+
+
+### 2.5.1.3 调用服务
+
+
+
+### 2.5.1.4 验证结果
+
+如果请求成功,你将会在控制台看到如下信息。
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. 如何禁用插件
+
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为关闭。
+
+
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.0/plugin-center/observability/logging-plugin.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.0/plugin-center/observability/logging-plugin.md
index a45d8dd2d4..c387bd8430 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.0/plugin-center/observability/logging-plugin.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.0/plugin-center/observability/logging-plugin.md
@@ -4,36 +4,114 @@ keywords: ["logging"]
description: logging插件
---
-## 说明
+# 1. 概述
-* `Apache ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging`
插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+## 1.1 插件名称
-## 插件设置
+* 请求日志记录插件
-* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+## 1.2 适用场景
-* 如果用户不需要,可以把插件禁用。
+* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+
+## 1.3 插件功能
+
+* 通过logback或者log4j收集请求的url,请求头,请求体,响应信息和响应体,并将请求信息存储在本地。
+
+## 1.4 插件代码
+
+* 核心模块 `shenyu-pluign-logging-console`.
+
+* 核心类 `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 添加自哪个shenyu版本
+
+* ShenYu 2.4.0
+# 2. 如何使用插件
-<img src="/img/shenyu/plugin/logging/logging_open.png" width="70%"
height="60%" />
+## 2.1 插件使用流程图
+
-* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+## 2.2 导入pom
+- 在ShenYu-Bootstrap导入对应的pom依赖。
```xml
- <!-- apache shenyu debug plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu debug plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* 选择器和规则配置,请参考: [选择器和规则管理](../../user-guide/admin-usage/selector-and-rule)。
-* 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
+## 2.3 启用插件
-## 场景
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为开启。
-* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+## 2.4 配置插件
+
+* 插件和选择器配置。请查看: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 示例
+
+## 2.5.1 收集http请求信息
+
+> 在你使用日志之前请在`ShenYuAdmin`开启日志插件.
+
+### 2.5.1.1 选择器配置
+
+
+
+### 2.5.1.2 规则配置
+
+
+
+### 2.5.1.3 调用服务
+
+
+
+### 2.5.1.4 验证结果
+
+如果请求成功,你将会在控制台看到如下信息。
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. 如何禁用插件
+
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为关闭。
+
+
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/plugin-center/observability/logging-plugin.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/plugin-center/observability/logging-plugin.md
index a45d8dd2d4..c387bd8430 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/plugin-center/observability/logging-plugin.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.1/plugin-center/observability/logging-plugin.md
@@ -4,36 +4,114 @@ keywords: ["logging"]
description: logging插件
---
-## 说明
+# 1. 概述
-* `Apache ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging`
插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+## 1.1 插件名称
-## 插件设置
+* 请求日志记录插件
-* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+## 1.2 适用场景
-* 如果用户不需要,可以把插件禁用。
+* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+
+## 1.3 插件功能
+
+* 通过logback或者log4j收集请求的url,请求头,请求体,响应信息和响应体,并将请求信息存储在本地。
+
+## 1.4 插件代码
+
+* 核心模块 `shenyu-pluign-logging-console`.
+
+* 核心类 `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 添加自哪个shenyu版本
+
+* ShenYu 2.4.0
+# 2. 如何使用插件
-<img src="/img/shenyu/plugin/logging/logging_open.png" width="70%"
height="60%" />
+## 2.1 插件使用流程图
+
-* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+## 2.2 导入pom
+- 在ShenYu-Bootstrap导入对应的pom依赖。
```xml
- <!-- apache shenyu debug plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu debug plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* 选择器和规则配置,请参考: [选择器和规则管理](../../user-guide/admin-usage/selector-and-rule)。
-* 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
+## 2.3 启用插件
-## 场景
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为开启。
-* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+## 2.4 配置插件
+
+* 插件和选择器配置。请查看: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 示例
+
+## 2.5.1 收集http请求信息
+
+> 在你使用日志之前请在`ShenYuAdmin`开启日志插件.
+
+### 2.5.1.1 选择器配置
+
+
+
+### 2.5.1.2 规则配置
+
+
+
+### 2.5.1.3 调用服务
+
+
+
+### 2.5.1.4 验证结果
+
+如果请求成功,你将会在控制台看到如下信息。
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. 如何禁用插件
+
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为关闭。
+
+
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.2/plugin-center/observability/logging-plugin.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.2/plugin-center/observability/logging-plugin.md
index a45d8dd2d4..c387bd8430 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.2/plugin-center/observability/logging-plugin.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.2/plugin-center/observability/logging-plugin.md
@@ -4,36 +4,114 @@ keywords: ["logging"]
description: logging插件
---
-## 说明
+# 1. 概述
-* `Apache ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging`
插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+## 1.1 插件名称
-## 插件设置
+* 请求日志记录插件
-* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+## 1.2 适用场景
-* 如果用户不需要,可以把插件禁用。
+* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+
+## 1.3 插件功能
+
+* 通过logback或者log4j收集请求的url,请求头,请求体,响应信息和响应体,并将请求信息存储在本地。
+
+## 1.4 插件代码
+
+* 核心模块 `shenyu-pluign-logging-console`.
+
+* 核心类 `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 添加自哪个shenyu版本
+
+* ShenYu 2.4.0
+# 2. 如何使用插件
-<img src="/img/shenyu/plugin/logging/logging_open.png" width="70%"
height="60%" />
+## 2.1 插件使用流程图
+
-* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+## 2.2 导入pom
+- 在ShenYu-Bootstrap导入对应的pom依赖。
```xml
- <!-- apache shenyu debug plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu debug plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* 选择器和规则配置,请参考: [选择器和规则管理](../../user-guide/admin-usage/selector-and-rule)。
-* 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
+## 2.3 启用插件
-## 场景
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为开启。
-* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+## 2.4 配置插件
+
+* 插件和选择器配置。请查看: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 示例
+
+## 2.5.1 收集http请求信息
+
+> 在你使用日志之前请在`ShenYuAdmin`开启日志插件.
+
+### 2.5.1.1 选择器配置
+
+
+
+### 2.5.1.2 规则配置
+
+
+
+### 2.5.1.3 调用服务
+
+
+
+### 2.5.1.4 验证结果
+
+如果请求成功,你将会在控制台看到如下信息。
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. 如何禁用插件
+
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为关闭。
+
+
diff --git
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.3/plugin-center/observability/logging-plugin.md
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.3/plugin-center/observability/logging-plugin.md
index a45d8dd2d4..c387bd8430 100644
---
a/i18n/zh/docusaurus-plugin-content-docs/version-2.4.3/plugin-center/observability/logging-plugin.md
+++
b/i18n/zh/docusaurus-plugin-content-docs/version-2.4.3/plugin-center/observability/logging-plugin.md
@@ -4,36 +4,114 @@ keywords: ["logging"]
description: logging插件
---
-## 说明
+# 1. 概述
-* `Apache ShenYu` 网关在对目标服务调用的时候,还容许用户使用 `logging`
插件在日志中打印本次请求信息,包含请求路径、请求方法、请求参数和响应头、响应体等信息。
+## 1.1 插件名称
-## 插件设置
+* 请求日志记录插件
-* 在 `shenyu-admin`--> 基础配置 --> 插件管理-> `logging` ,设置为开启。
+## 1.2 适用场景
-* 如果用户不需要,可以把插件禁用。
+* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+
+## 1.3 插件功能
+
+* 通过logback或者log4j收集请求的url,请求头,请求体,响应信息和响应体,并将请求信息存储在本地。
+
+## 1.4 插件代码
+
+* 核心模块 `shenyu-pluign-logging-console`.
+
+* 核心类 `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 添加自哪个shenyu版本
+
+* ShenYu 2.4.0
+# 2. 如何使用插件
-<img src="/img/shenyu/plugin/logging/logging_open.png" width="70%"
height="60%" />
+## 2.1 插件使用流程图
+
-* 在网关的 `pom.xml` 文件中添加 `logging` 的支持。
+## 2.2 导入pom
+- 在ShenYu-Bootstrap导入对应的pom依赖。
```xml
- <!-- apache shenyu debug plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu debug plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* 选择器和规则配置,请参考: [选择器和规则管理](../../user-guide/admin-usage/selector-and-rule)。
-* 只有匹配的请求,并且配置规则才会打印本次请求相关信息。
+## 2.3 启用插件
-## 场景
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为开启。
-* 开发时调试或者线上排查问题等情况下,需要在网关侧查看本次请求在转发过程中的相关信息,如请求头、请求参数或响应头、响应体等。
+## 2.4 配置插件
+
+* 插件和选择器配置。请查看: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 示例
+
+## 2.5.1 收集http请求信息
+
+> 在你使用日志之前请在`ShenYuAdmin`开启日志插件.
+
+### 2.5.1.1 选择器配置
+
+
+
+### 2.5.1.2 规则配置
+
+
+
+### 2.5.1.3 调用服务
+
+
+
+### 2.5.1.4 验证结果
+
+如果请求成功,你将会在控制台看到如下信息。
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. 如何禁用插件
+
+- 在 `shenyu-admin` --> 基础配置 --> 插件管理-> logging ,设置为关闭。
+
+
diff --git a/static/img/shenyu/plugin/logging/logging-console/call-service.png
b/static/img/shenyu/plugin/logging/logging-console/call-service.png
new file mode 100644
index 0000000000..35fb056b24
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/call-service.png differ
diff --git a/static/img/shenyu/plugin/logging/logging-console/log-rule-en.jpg
b/static/img/shenyu/plugin/logging/logging-console/log-rule-en.jpg
new file mode 100644
index 0000000000..d1c1bb3124
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/log-rule-en.jpg differ
diff --git a/static/img/shenyu/plugin/logging/logging-console/log-rule-zh.jpg
b/static/img/shenyu/plugin/logging/logging-console/log-rule-zh.jpg
new file mode 100644
index 0000000000..183dac00af
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/log-rule-zh.jpg differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/log-selector-en.jpg
b/static/img/shenyu/plugin/logging/logging-console/log-selector-en.jpg
new file mode 100644
index 0000000000..c14bd842d3
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/log-selector-en.jpg differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/log-selector-zh.jpg
b/static/img/shenyu/plugin/logging/logging-console/log-selector-zh.jpg
new file mode 100644
index 0000000000..2352c94639
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/log-selector-zh.jpg differ
diff --git a/static/img/shenyu/plugin/logging/logging-console/logging-en.jpg
b/static/img/shenyu/plugin/logging/logging-console/logging-en.jpg
new file mode 100644
index 0000000000..eb91475f78
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/logging-en.jpg differ
diff --git a/static/img/shenyu/plugin/logging/logging-console/logging-zh.jpg
b/static/img/shenyu/plugin/logging/logging-console/logging-zh.jpg
new file mode 100644
index 0000000000..4d659773d7
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/logging-zh.jpg differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-en.png
b/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-en.png
new file mode 100644
index 0000000000..08b32a17a7
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-en.png
differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-zh.jpg
b/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-zh.jpg
new file mode 100644
index 0000000000..f4a6b92db2
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/loggingConsole-use-zh.jpg
differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-en.jpg
b/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-en.jpg
new file mode 100644
index 0000000000..c4b5bbd501
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-en.jpg
differ
diff --git
a/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-zh.jpg
b/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-zh.jpg
new file mode 100644
index 0000000000..51e6329fb8
Binary files /dev/null and
b/static/img/shenyu/plugin/logging/logging-console/unenable-log-plugin-zh.jpg
differ
diff --git
a/versioned_docs/version-2.4.0/plugin-center/observability/logging-plugin.md
b/versioned_docs/version-2.4.0/plugin-center/observability/logging-plugin.md
index ec3f460bad..aea7f4655e 100644
--- a/versioned_docs/version-2.4.0/plugin-center/observability/logging-plugin.md
+++ b/versioned_docs/version-2.4.0/plugin-center/observability/logging-plugin.md
@@ -4,29 +4,114 @@ keywords: ["logging"]
description: logging plugin
---
-## Description
+# 1. Overview
-* When making invokes to the target service, Apache ShenYu gateway also allows
users to print the request information in the log that includes the request
path, request method, request parameters, response header, response body ...etc.
+## 1.1 Plugin Name
-## Plugin Setting
+* Logging-Console Plugin
-* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
-* Introduce `logging` support in the pox.xml file of the gateway.
-* If the user don't use, please disable the plugin in the background.
+## 1.2 Appropriate Scenario
+
+* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+
+## 1.3 Plugin functionality
+
+* Collect http request url, header, request body, response and response body
by logback or log4j, the log file will be saved locally.
+
+## 1.4 Plugin code
+
+* Core Module `shenyu-pluign-logging-console`.
+
+* Core Class `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 Added Since Which shenyu version
+
+* Since shenyu 2.4.0
+
+# 2. How to use plugin
+
+## 2.1 Plugin-use procedure chart
+
+
+
+## 2.2 Import pom
+
+- import maven config in shenyu-bootstrap project's `pom.xml` file.
```xml
- <!-- apache shenyu logging plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu logging plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* Selectors and rules, please refer to: [Selector And Rule
Config](../../user-guide/admin-usage/selector-and-rule)。
-* Only those matched requests can print the information about this request.
+## 2.3 Enable plugin
-## Situation
+- In shenyu-admin --> BasicConfig --> Plugin --> loggingConsole set Status
enable.
-* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+## 2.4 Config plugin
+
+* Selector and rule Config. Please refer: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 Examples
+
+## 2.5.1 Collect all http request log
+
+> you must open loggingConsole plugin before you use loggingConsole plugin.
+
+### 2.5.1.1 Selctor Configuration
+
+
+
+### 2.5.1.2 Rule Configuration
+
+
+
+### 2.5.1.3 Call Http Service
+
+
+
+### 2.5.1.4 Check Result
+
+if the request arrived successfully, you will see request information as
follow.
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. How to disable plugin
+
+- In `shenyu-admin` --> BasicConfig --> Plugin --> `loggingConsole` set Status
disable.
+
+
diff --git
a/versioned_docs/version-2.4.1/plugin-center/observability/logging-plugin.md
b/versioned_docs/version-2.4.1/plugin-center/observability/logging-plugin.md
index ec3f460bad..aea7f4655e 100644
--- a/versioned_docs/version-2.4.1/plugin-center/observability/logging-plugin.md
+++ b/versioned_docs/version-2.4.1/plugin-center/observability/logging-plugin.md
@@ -4,29 +4,114 @@ keywords: ["logging"]
description: logging plugin
---
-## Description
+# 1. Overview
-* When making invokes to the target service, Apache ShenYu gateway also allows
users to print the request information in the log that includes the request
path, request method, request parameters, response header, response body ...etc.
+## 1.1 Plugin Name
-## Plugin Setting
+* Logging-Console Plugin
-* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
-* Introduce `logging` support in the pox.xml file of the gateway.
-* If the user don't use, please disable the plugin in the background.
+## 1.2 Appropriate Scenario
+
+* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+
+## 1.3 Plugin functionality
+
+* Collect http request url, header, request body, response and response body
by logback or log4j, the log file will be saved locally.
+
+## 1.4 Plugin code
+
+* Core Module `shenyu-pluign-logging-console`.
+
+* Core Class `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 Added Since Which shenyu version
+
+* Since shenyu 2.4.0
+
+# 2. How to use plugin
+
+## 2.1 Plugin-use procedure chart
+
+
+
+## 2.2 Import pom
+
+- import maven config in shenyu-bootstrap project's `pom.xml` file.
```xml
- <!-- apache shenyu logging plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu logging plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* Selectors and rules, please refer to: [Selector And Rule
Config](../../user-guide/admin-usage/selector-and-rule)。
-* Only those matched requests can print the information about this request.
+## 2.3 Enable plugin
-## Situation
+- In shenyu-admin --> BasicConfig --> Plugin --> loggingConsole set Status
enable.
-* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+## 2.4 Config plugin
+
+* Selector and rule Config. Please refer: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 Examples
+
+## 2.5.1 Collect all http request log
+
+> you must open loggingConsole plugin before you use loggingConsole plugin.
+
+### 2.5.1.1 Selctor Configuration
+
+
+
+### 2.5.1.2 Rule Configuration
+
+
+
+### 2.5.1.3 Call Http Service
+
+
+
+### 2.5.1.4 Check Result
+
+if the request arrived successfully, you will see request information as
follow.
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. How to disable plugin
+
+- In `shenyu-admin` --> BasicConfig --> Plugin --> `loggingConsole` set Status
disable.
+
+
diff --git
a/versioned_docs/version-2.4.2/plugin-center/observability/logging-plugin.md
b/versioned_docs/version-2.4.2/plugin-center/observability/logging-plugin.md
index ec3f460bad..aea7f4655e 100644
--- a/versioned_docs/version-2.4.2/plugin-center/observability/logging-plugin.md
+++ b/versioned_docs/version-2.4.2/plugin-center/observability/logging-plugin.md
@@ -4,29 +4,114 @@ keywords: ["logging"]
description: logging plugin
---
-## Description
+# 1. Overview
-* When making invokes to the target service, Apache ShenYu gateway also allows
users to print the request information in the log that includes the request
path, request method, request parameters, response header, response body ...etc.
+## 1.1 Plugin Name
-## Plugin Setting
+* Logging-Console Plugin
-* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
-* Introduce `logging` support in the pox.xml file of the gateway.
-* If the user don't use, please disable the plugin in the background.
+## 1.2 Appropriate Scenario
+
+* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+
+## 1.3 Plugin functionality
+
+* Collect http request url, header, request body, response and response body
by logback or log4j, the log file will be saved locally.
+
+## 1.4 Plugin code
+
+* Core Module `shenyu-pluign-logging-console`.
+
+* Core Class `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 Added Since Which shenyu version
+
+* Since shenyu 2.4.0
+
+# 2. How to use plugin
+
+## 2.1 Plugin-use procedure chart
+
+
+
+## 2.2 Import pom
+
+- import maven config in shenyu-bootstrap project's `pom.xml` file.
```xml
- <!-- apache shenyu logging plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu logging plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* Selectors and rules, please refer to: [Selector And Rule
Config](../../user-guide/admin-usage/selector-and-rule)。
-* Only those matched requests can print the information about this request.
+## 2.3 Enable plugin
-## Situation
+- In shenyu-admin --> BasicConfig --> Plugin --> loggingConsole set Status
enable.
-* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+## 2.4 Config plugin
+
+* Selector and rule Config. Please refer: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 Examples
+
+## 2.5.1 Collect all http request log
+
+> you must open loggingConsole plugin before you use loggingConsole plugin.
+
+### 2.5.1.1 Selctor Configuration
+
+
+
+### 2.5.1.2 Rule Configuration
+
+
+
+### 2.5.1.3 Call Http Service
+
+
+
+### 2.5.1.4 Check Result
+
+if the request arrived successfully, you will see request information as
follow.
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. How to disable plugin
+
+- In `shenyu-admin` --> BasicConfig --> Plugin --> `loggingConsole` set Status
disable.
+
+
diff --git
a/versioned_docs/version-2.4.3/plugin-center/observability/logging-plugin.md
b/versioned_docs/version-2.4.3/plugin-center/observability/logging-plugin.md
index c50f0d2fca..aea7f4655e 100644
--- a/versioned_docs/version-2.4.3/plugin-center/observability/logging-plugin.md
+++ b/versioned_docs/version-2.4.3/plugin-center/observability/logging-plugin.md
@@ -4,31 +4,114 @@ keywords: ["logging"]
description: logging plugin
---
-## Description
+# 1. Overview
-* When making invokes to the target service, Apache ShenYu gateway also allows
users to print the request information in the log that includes the request
path, request method, request parameters, response header, response body ...etc.
+## 1.1 Plugin Name
-## Plugin Setting
+* Logging-Console Plugin
-* In `shenyu-admin` --> BasicConfig --> Plugin --> `logging`, set to enable.
-* If the user don't use, please disable the plugin in the background.
- <img src="/img/shenyu/plugin/logging/logging_open_en.png" width="70%"
height="60%" />
+## 1.2 Appropriate Scenario
-* Introduce `logging` support in the pox.xml file of the gateway.
+* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+
+## 1.3 Plugin functionality
+
+* Collect http request url, header, request body, response and response body
by logback or log4j, the log file will be saved locally.
+
+## 1.4 Plugin code
+
+* Core Module `shenyu-pluign-logging-console`.
+
+* Core Class `org.apache.shenyu.plugin.logging.console.LoggingConsolePlugin`
+
+## 1.5 Added Since Which shenyu version
+
+* Since shenyu 2.4.0
+
+# 2. How to use plugin
+
+## 2.1 Plugin-use procedure chart
+
+
+
+## 2.2 Import pom
+
+- import maven config in shenyu-bootstrap project's `pom.xml` file.
```xml
- <!-- apache shenyu logging plugin start-->
- <dependency>
- <groupId>org.apache.shenyu</groupId>
- <artifactId>shenyu-spring-boot-starter-plugin-logging</artifactId>
- <version>${project.version}</version>
- </dependency>
- <!-- apache shenyu logging plugin end-->
+<dependency>
+ <groupId>org.apache.shenyu</groupId>
+ <artifactId>shenyu-spring-boot-starter-plugin-logging-console</artifactId>
+ <version>${project.version}</version>
+</dependency>
```
-* Selectors and rules, please refer to: [Selector And Rule
Config](../../user-guide/admin-usage/selector-and-rule)。
-* Only those matched requests can print the information about this request.
+## 2.3 Enable plugin
-## Situation
+- In shenyu-admin --> BasicConfig --> Plugin --> loggingConsole set Status
enable.
-* Users may want to view the information about request(including request
headers, request parameters, response headers, response body...etc) where in
the side of gateway when debugging during development or troubleshooting
problems online.
+## 2.4 Config plugin
+
+* Selector and rule Config. Please refer: [Selector and rule
config](../../user-guide/admin-usage/selector-and-rule.md).
+
+## 2.5 Examples
+
+## 2.5.1 Collect all http request log
+
+> you must open loggingConsole plugin before you use loggingConsole plugin.
+
+### 2.5.1.1 Selctor Configuration
+
+
+
+### 2.5.1.2 Rule Configuration
+
+
+
+### 2.5.1.3 Call Http Service
+
+
+
+### 2.5.1.4 Check Result
+
+if the request arrived successfully, you will see request information as
follow.
+
+```
+Request Uri: http://localhost:9195/test/payment
+Request Method: POST
+
+[Request Headers Start]
+Content-Type: application/json
+Content-Length: 46
+Host: localhost:9195
+Connection: Keep-Alive
+User-Agent: Apache-HttpClient/4.5.13 (Java/11.0.11)
+Cookie: JSESSIONID=CD325CE813F61BB37783A1D0835959DD
+Accept-Encoding: gzip,deflate
+[Request Headers End]
+
+[Request Body Start]
+{
+ "userId": "11",
+ "userName": "xiaoming"
+}
+[Request Body End]
+
+Response Code: 200 OK
+
+[Response Headers Start]
+transfer-encoding: chunked
+Content-Length: 37
+Content-Type: application/json
+[Response Headers End]
+
+[Response Body Start]
+{"userId":"11","userName":"xiaoming"}
+[Response Body End]
+```
+
+# 3. How to disable plugin
+
+- In `shenyu-admin` --> BasicConfig --> Plugin --> `loggingConsole` set Status
disable.
+
+