Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change(syslog): remove deprecated max_retry_times and retry_interval #7699

Merged
merged 1 commit into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions apisix/plugins/syslog.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions docs/en/latest/plugins/syslog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |

Expand Down
2 changes: 0 additions & 2 deletions docs/zh/latest/plugins/syslog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |

Expand Down
4 changes: 2 additions & 2 deletions t/plugin/prometheus2.t
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down