You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ni...@apache.org on 2022/04/11 01:12:12 UTC

[apisix] branch master updated: fix: inappropriate default timeout of syslog schema (#6807)

This is an automated email from the ASF dual-hosted git repository.

nic443 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 392f6c1f0 fix: inappropriate default timeout of syslog schema (#6807)
392f6c1f0 is described below

commit 392f6c1f0976fb9a9e54304356528165b6cb9d42
Author: Nic <qi...@api7.ai>
AuthorDate: Mon Apr 11 09:12:06 2022 +0800

    fix: inappropriate default timeout of syslog schema (#6807)
---
 apisix/plugins/syslog.lua        | 2 +-
 docs/en/latest/plugins/syslog.md | 2 +-
 docs/zh/latest/plugins/syslog.md | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apisix/plugins/syslog.lua b/apisix/plugins/syslog.lua
index 0b5b5a966..be73cac55 100644
--- a/apisix/plugins/syslog.lua
+++ b/apisix/plugins/syslog.lua
@@ -33,7 +33,7 @@ local schema = {
         retry_interval = {type = "integer", minimum = 0},
         flush_limit = {type = "integer", minimum = 1, default = 4096},
         drop_limit = {type = "integer", default = 1048576},
-        timeout = {type = "integer", minimum = 1, default = 3},
+        timeout = {type = "integer", minimum = 1, default = 3000},
         sock_type = {type = "string", default = "tcp", enum = {"tcp", "udp"}},
         pool_size = {type = "integer", minimum = 5, default = 5},
         tls = {type = "boolean", default = false},
diff --git a/docs/en/latest/plugins/syslog.md b/docs/en/latest/plugins/syslog.md
index 4c9db05ad..6b5c6ea99 100644
--- a/docs/en/latest/plugins/syslog.md
+++ b/docs/en/latest/plugins/syslog.md
@@ -34,7 +34,7 @@ This will provide the ability to send Log data requests as JSON objects.
 | host             | string  | required    |              |               | IP address or the Hostname.                                                                                                                                                                          |
 | port             | integer | required    |              |               | Target upstream port.                                                                                                                                                                                |
 | name             | string  | optional    | "sys logger" |               |                                                                                                                                                                                                      |
-| timeout          | integer | optional    | 3            | [1, ...]      | Timeout for the upstream to send data.                                                                                                                                                               |
+| timeout          | integer | optional    | 3000         | [1, ...]      | Timeout for the upstream to send data (unit: ms).                                                                                                                                                    |
 | tls              | boolean | optional    | false        |               | Control whether to perform SSL verification                                                                                                                                                          |
 | flush_limit      | integer | optional    | 4096         | [1, ...]      | If the buffered messages' size plus the current message size reaches (>=) this limit (in bytes), the buffered log messages will be written to log server. Default to 4096 (4KB).                     |
 | drop_limit       | integer | optional    | 1048576      |               | If the buffered messages' size plus the current message size is larger than this limit (in bytes), the current log message will be dropped because of limited buffer size. Default to 1048576 (1MB). |
diff --git a/docs/zh/latest/plugins/syslog.md b/docs/zh/latest/plugins/syslog.md
index 0c27b8e7d..f3ca7e9dc 100644
--- a/docs/zh/latest/plugins/syslog.md
+++ b/docs/zh/latest/plugins/syslog.md
@@ -34,7 +34,7 @@ title: syslog
 | host             | string  | 必须   |              |               | IP 地址或主机名                                                                                                                       |
 | port             | integer | 必须   |              |               | 目标上游端口                                                                                                                         |
 | name             | string  | 可选   | "sys logger" |               |                                                                                                                                      |
-| timeout          | integer | 可选   | 3            | [1, ...]      | 上游发送数据超时                                                                                                                     |
+| timeout          | integer | 可选   | 3000         | [1, ...]      | 上游发送数据超时(以毫秒为单位)。                                                                                                   |
 | tls              | boolean | 可选   | false        |               | 用于控制是否执行 SSL 验证                                                                                                              |
 | flush_limit      | integer | 可选   | 4096         | [1, ...]      | 如果缓冲的消息的大小加上当前消息的大小达到(> =)此限制(以字节为单位),则缓冲的日志消息将被写入日志服务器。默认为 4096(4KB)|
 | drop_limit       | integer | 可选   | 1048576      |               | 如果缓冲的消息的大小加上当前消息的大小大于此限制(以字节为单位),则由于缓冲区大小有限,当前的日志消息将被丢弃。默认为 1048576(1MB)|