You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/08/17 01:50:32 UTC

[apisix] branch master updated: change(syslog): remove deprecated max_retry_times and retry_interval (#7699)

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

spacewander 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 2015a50b0 change(syslog): remove deprecated max_retry_times and retry_interval (#7699)
2015a50b0 is described below

commit 2015a50b069514afb87bd474bdbc23b54c6e496f
Author: tzssangglass <tz...@gmail.com>
AuthorDate: Wed Aug 17 09:50:27 2022 +0800

    change(syslog): remove deprecated max_retry_times and retry_interval (#7699)
---
 apisix/plugins/syslog.lua        | 4 ----
 docs/en/latest/plugins/syslog.md | 2 --
 docs/zh/latest/plugins/syslog.md | 2 --
 t/plugin/prometheus2.t           | 4 ++--
 4 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/apisix/plugins/syslog.lua b/apisix/plugins/syslog.lua
index 7eb4675c0..b57f8a123 100644
--- a/apisix/plugins/syslog.lua
+++ b/apisix/plugins/syslog.lua
@@ -28,8 +28,6 @@ local schema = {
     properties = {
         host = {type = "string"},
         port = {type = "integer"},
-        max_retry_times = {type = "integer", minimum = 1},
-        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 = 3000},
@@ -59,8 +57,6 @@ function _M.check_schema(conf)
         return false, err
     end
 
-    conf.max_retry_count = conf.max_retry_times or conf.max_retry_count
-    conf.retry_delay = conf.retry_interval or conf.retry_delay
     return true
 end
 
diff --git a/docs/en/latest/plugins/syslog.md b/docs/en/latest/plugins/syslog.md
index b8e46c78f..fdfb6e12b 100644
--- a/docs/en/latest/plugins/syslog.md
+++ b/docs/en/latest/plugins/syslog.md
@@ -44,8 +44,6 @@ Logs can be set as JSON objects.
 | flush_limit      | integer | False    | 4096         | [1, ...]      | Maximum size of the buffer (KB) and the current message before it is flushed and written to the server.                  |
 | drop_limit       | integer | False    | 1048576      |               | Maximum size of the buffer (KB) and the current message before the current message is dropped because of the size limit. |
 | sock_type        | string  | False    | "tcp"        | ["tcp", "udp] | Transport layer protocol to use.                                                                                         |
-| max_retry_times  | integer | False    |              | [1, ...]      | Deprecated. Use `max_retry_count` instead. Maximum number of retries if a connection to a log server fails.              |
-| retry_interval   | integer | False    |              | [0, ...]      | Deprecated. Use `retry_delay` instead. Time in ms before retrying the connection to the log server.                      |
 | pool_size        | integer | False    | 5            | [5, ...]      | Keep-alive pool size used by `sock:keepalive`.                                                                           |
 | include_req_body | boolean | False    | false        |               | When set to `true` includes the request body in the log.                                                                 |
 
diff --git a/docs/zh/latest/plugins/syslog.md b/docs/zh/latest/plugins/syslog.md
index f3ca7e9dc..a82dc4f37 100644
--- a/docs/zh/latest/plugins/syslog.md
+++ b/docs/zh/latest/plugins/syslog.md
@@ -39,8 +39,6 @@ title: syslog
 | flush_limit      | integer | 可选   | 4096         | [1, ...]      | 如果缓冲的消息的大小加上当前消息的大小达到(> =)此限制(以字节为单位),则缓冲的日志消息将被写入日志服务器。默认为 4096(4KB)|
 | drop_limit       | integer | 可选   | 1048576      |               | 如果缓冲的消息的大小加上当前消息的大小大于此限制(以字节为单位),则由于缓冲区大小有限,当前的日志消息将被丢弃。默认为 1048576(1MB)|
 | sock_type        | string  | 可选   | "tcp"        | ["tcp","udp"] | 用于传输层的 IP 协议类型。                                                                                                             |
-| max_retry_times  | integer | 可选   |              | [1, ...]      | 已废弃。请改用 `max_retry_count`。连接到日志服务器失败或将日志消息发送到日志服务器失败后的最大重试次数。                                                               |
-| retry_interval   | integer | 可选   |              | [0, ...]      | 已废弃。请改用 `retry_delay`。重试连接到日志服务器或重试向日志服务器发送日志消息之前的时间延迟(以毫秒为单位)。                                                   |
 | pool_size        | integer | 可选   | 5            | [5, ...]      | sock:keepalive 使用的 Keepalive 池大小。                                                                                               |
 | include_req_body | boolean | 可选   | false        |               | 是否包括请求 body                                                                                                                    |
 
diff --git a/t/plugin/prometheus2.t b/t/plugin/prometheus2.t
index 531f72211..178751e1f 100644
--- a/t/plugin/prometheus2.t
+++ b/t/plugin/prometheus2.t
@@ -352,9 +352,9 @@ GET /apisix/prometheus/metrics
                             "syslog": {
                                 "host": "127.0.0.1",
                                 "include_req_body": false,
-                                "max_retry_times": 1,
+                                "max_retry_count": 1,
                                 "tls": false,
-                                "retry_interval": 1,
+                                "retry_delay": 1,
                                 "batch_max_size": 1000,
                                 "buffer_duration": 60,
                                 "port": 1000,