Merge pull request #7690 from EMQ-YangM/log_config_i18n_support

feat(emqx_conf_schema): log config add i18n support
This commit is contained in:
Yang Miao 2022-04-20 18:16:21 +08:00 committed by GitHub
commit 249ef5ad34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 348 additions and 184 deletions

View File

@ -806,121 +806,121 @@ Ensure that the number of completed transactions is less than the <code>max_hist
log_file_handlers {
desc {
en: """Key-value list of file-based log handlers."""
zh: """"""
zh: """基于文件的日志处理进程的键值列表。"""
}
label: {
en: ""
zh: ""
en: "Log Handlers Key Val List"
zh: "日志处理进程键值列表"
}
}
log_error_logger {
desc {
en: """Deprecated."""
zh: """"""
zh: """该配置已弃用。"""
}
label: {
en: ""
zh: ""
en: "Deprecate"
zh: "配置已弃用"
}
}
console_handler_enable {
desc {
en: """Enable this log handler."""
zh: """"""
zh: """启用此日志处理进程。"""
}
label: {
en: ""
zh: ""
en: "Enable Log Handler"
zh: "启用日志处理进程"
}
}
console_handler_level {
desc {
en: """Global log level. This includes the primary log level and all log handlers."""
zh: """"""
zh: """全局日志级别。 这包括主日志级别和所有日志处理进程。"""
}
label: {
en: ""
zh: ""
en: "Global Log Level"
zh: "全局日志级别"
}
}
console_handler_time_offset {
desc {
en: """The time offset to be used when formatting the timestamp."""
zh: """"""
zh: """格式化时间戳时,使用的时间偏移量。"""
}
label: {
en: ""
zh: ""
en: "Time Offset"
zh: "时间偏移量"
}
}
console_handler_chars_limit {
desc {
en: """Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated."""
zh: """"""
zh: """设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。"""
}
label: {
en: ""
zh: ""
en: "Single Log Max Length"
zh: "单个日志最大长度"
}
}
console_handler_formatter {
desc {
en: """Choose log format. <code>text</code> for free text, and <code>json</code> for structured logging."""
zh: """"""
zh: """选择日志格式。 <code>text</code> 用于自由文本,<code>json</code> 用于结构化日志记录。"""
}
label: {
en: ""
zh: ""
en: "Log Format"
zh: "日志格式"
}
}
console_handler_single_line {
desc {
en: """Print logs in a single line if set to true. Otherwise, log messages may span multiple lines."""
zh: """"""
zh: """如果设置为 true则在一行中打印日志。 否则,日志消息可能跨越多行。"""
}
label: {
en: ""
zh: ""
en: "Single Line Mode"
zh: "单行模式"
}
}
console_handler_sync_mode_qlen {
desc {
en: """As long as the number of buffered log events is lower than this value, all log events are handled asynchronously."""
zh: """"""
zh: """只要缓冲的日志事件的数量低于这个值,所有的日志事件都会被异步处理。"""
}
label: {
en: ""
zh: ""
en: "Sync Mode Max Log Events"
zh: "异步模式最大事件数"
}
}
console_handler_drop_mode_qlen {
desc {
en: """When the number of buffered log events is larger than this value, the new log events are dropped.<br/>When drop mode is activated or deactivated, a message is printed in the logs."""
zh: """"""
zh: """当缓冲的日志事件数大于此值时,新的日志事件将被丢弃。<br/>启用或停用丢弃模式时,会在日志中打印一条消息。"""
}
label: {
en: ""
zh: ""
en: "Drop Mode Max Log Events"
zh: "缓存最大日志事件数"
}
}
console_handler_flush_qlen {
desc {
en: """If the number of buffered log events grows larger than this threshold, a flush (delete) operation takes place. To flush events, the handler discards the buffered log messages without logging."""
zh: """"""
zh: """如果缓冲日志事件的数量增长大于此阈值,则会发生刷新(删除)操作。 为了完成刷新事件,处理进程丢弃缓冲的日志消息。"""
}
label: {
en: ""
zh: ""
en: "Flush Threshold"
zh: "刷新阈值"
}
}
@ -929,143 +929,145 @@ Ensure that the number of completed transactions is less than the <code>max_hist
en: """Type of supervisor reports that are logged.
- `error`: only log errors in the Erlang processes.
- `progress`: log process startup."""
zh: """"""
zh: """ supervisor 报告的类型。
- `error`:仅记录 Erlang 进程中的错误。
- `progress`:记录进程启动。"""
}
label: {
en: ""
zh: ""
en: "Report Type"
zh: "报告类型"
}
}
console_handler_max_depth {
desc {
en: """Maximum depth for Erlang term log formatting and Erlang process message queue inspection."""
zh: """"""
zh: """Erlang 内部格式日志格式化和 Erlang 进程消息队列检查的最大深度。"""
}
label: {
en: ""
zh: ""
en: "Max Depth"
zh: "最大深度"
}
}
log_file_handler_file {
desc {
en: """Name the log file."""
zh: """"""
zh: """日志文件名字。"""
}
label: {
en: ""
zh: ""
en: "Log File Name"
zh: "日志文件名字"
}
}
log_file_handler_max_size {
desc {
en: """This parameter controls log file rotation. The value `infinity` means the log file will grow indefinitely, otherwise the log file will be rotated once it reaches `max_size` in bytes."""
zh: """"""
zh: """此参数控制日志文件轮换。 `infinity` 意味着日志文件将无限增长,否则日志文件将在达到 `max_size`(以字节为单位)时进行轮换。"""
}
label: {
en: ""
zh: ""
en: "Rotation Size"
zh: "日志文件轮换大小"
}
}
log_file_handler_enable {
desc {
en: """Enable this log handler."""
zh: """"""
zh: """启用此日志处理进程。"""
}
label: {
en: ""
zh: ""
en: "Enable Log Handler"
zh: "启用此日志处理进程"
}
}
log_file_handler_level {
desc {
en: """Global log level. This includes the primary log level and all log handlers."""
zh: """"""
zh: """全局日志级别。 这包括主日志级别和所有日志处理进程。"""
}
label: {
en: ""
zh: ""
en: "Global Level"
zh: "全局日志级别"
}
}
log_file_handler_time_offset {
desc {
en: """The time offset to be used when formatting the timestamp."""
zh: """"""
zh: """格式化时间戳时要使用的时间偏移量。"""
}
label: {
en: ""
zh: ""
en: "Time Offset"
zh: "时间偏移"
}
}
log_file_handler_chars_limit {
desc {
en: """Set the maximum length of a single log message. If this length is exceeded, the log message will be truncated."""
zh: """"""
zh: """设置单个日志消息的最大长度。 如果超过此长度,则日志消息将被截断。"""
}
label: {
en: ""
zh: ""
en: "Single Log Max Length"
zh: "单个日志消息最大长度"
}
}
log_file_handler_formatter {
desc {
en: """Choose log format. <code>text</code> for free text, and <code>json</code> for structured logging."""
zh: """"""
zh: """选择日志格式。 <code>text</code> 用于自由文本,<code>json</code> 用于结构化日志记录。"""
}
label: {
en: ""
zh: ""
en: "Log Format"
zh: "日志格式"
}
}
log_file_handler_single_line {
desc {
en: """Print logs in a single line if set to true. Otherwise, log messages may span multiple lines."""
zh: """"""
zh: """如果设置为 true则在一行中打印日志。 否则,日志消息可能跨越多行。"""
}
label: {
en: ""
zh: ""
en: "Single Line Mode"
zh: "单行模式"
}
}
log_file_handler_sync_mode_qlen {
desc {
en: """As long as the number of buffered log events is lower than this value, all log events are handled asynchronously."""
zh: """"""
zh: """只要缓冲的日志事件的数量低于这个值,所有的日志事件都会被异步处理。"""
}
label: {
en: ""
zh: ""
en: "Sync Mode Max Log Events"
zh: "异步模式最大事件数"
}
}
log_file_handler_drop_mode_qlen {
desc {
en: """When the number of buffered log events is larger than this value, the new log events are dropped.<br/>When drop mode is activated or deactivated, a message is printed in the logs."""
zh: """"""
zh: """当缓冲的日志事件数大于此值时,新的日志事件将被丢弃。<br/>启用或停用丢弃模式时,会在日志中打印一条消息。"""
}
label: {
en: ""
zh: ""
en: "Drop Mode Max Log Events"
zh: "缓存最大日志事件数"
}
}
log_file_handler_flush_qlen {
desc {
en: """If the number of buffered log events grows larger than this threshold, a flush (delete) operation takes place. To flush events, the handler discards the buffered log messages without logging."""
zh: """"""
zh: """如果缓冲日志事件的数量增长大于此阈值,则会发生刷新(删除)操作。 为了完成刷新事件,处理进程丢弃缓冲的日志消息。"""
}
label: {
en: ""
zh: ""
en: "Flush Threshold"
zh: "刷新阈值"
}
}
@ -1074,121 +1076,123 @@ Ensure that the number of completed transactions is less than the <code>max_hist
en: """Type of supervisor reports that are logged.
- `error`: only log errors in the Erlang processes.
- `progress`: log process startup."""
zh: """"""
zh: """ supervisor 报告的类型。
- `error`:仅记录 Erlang 进程中的错误。
- `progress`:记录进程启动。"""
}
label: {
en: ""
zh: ""
en: "Report Type"
zh: "报告类型"
}
}
log_file_handler_max_depth {
desc {
en: """Maximum depth for Erlang term log formatting and Erlang process message queue inspection."""
zh: """"""
zh: """Erlang 内部格式日志格式化和 Erlang 进程消息队列检查的最大深度。"""
}
label: {
en: ""
zh: ""
en: "Max Depth"
zh: "最大深度"
}
}
log_rotation_enable {
desc {
en: """Enable log rotation feature."""
zh: """"""
zh: """启用日志轮换功能。"""
}
label: {
en: ""
zh: ""
en: "Rotation Enable"
zh: "日志轮换"
}
}
log_rotation_count {
desc {
en: """Maximum number of log files."""
zh: """"""
zh: """最大日志文件数。"""
}
label: {
en: ""
zh: ""
en: "Max Log Files Number"
zh: "最大日志文件数"
}
}
log_overload_kill_enable {
desc {
en: """Enable log handler overload kill feature."""
zh: """"""
zh: """启用日志处理进程过载终止功能。"""
}
label: {
en: ""
zh: ""
en: "Log Handler Overload Kill"
zh: "日志处理进程过载终止"
}
}
log_overload_kill_mem_size {
desc {
en: """Maximum memory size that the handler process is allowed to use."""
zh: """"""
zh: """处理进程进程允许使用的最大内存。"""
}
label: {
en: ""
zh: ""
en: "Handler Allowed Max Memory Size"
zh: "理进程进程允许使用的最大内存"
}
}
log_overload_kill_qlen {
desc {
en: """Maximum allowed queue length."""
zh: """"""
zh: """允许的最大队列长度。"""
}
label: {
en: ""
zh: ""
en: "Max Queue Length"
zh: "最大队列长度"
}
}
log_overload_kill_restart_after {
desc {
en: """If the handler is terminated, it restarts automatically after a delay specified in milliseconds. The value `infinity` prevents restarts."""
zh: """"""
zh: """如果处理进程终止,它会在以毫秒为单位指定的延迟后自动重新启动。 `infinity` 防止重新启动。"""
}
label: {
en: ""
zh: ""
en: "Handler Restart Delay"
zh: "处理进程重启延迟"
}
}
log_burst_limit_enable {
desc {
en: """Enable log burst control feature."""
zh: """"""
zh: """启用日志突发控制功能。"""
}
label: {
en: ""
zh: ""
en: "Enable Burst"
zh: "启用日志突发控制"
}
}
log_burst_limit_max_count {
desc {
en: """Maximum number of log events to handle within a `window_time` interval. After the limit is reached, successive events are dropped until the end of the `window_time`."""
zh: """"""
zh: """在 `window_time` 间隔内处理的最大日志事件数。 达到限制后,将丢弃连续事件,直到 `window_time` 结束。"""
}
label: {
en: ""
zh: ""
en: "Events Number"
zh: "日志事件数"
}
}
log_burst_limit_window_time {
desc {
en: """See `max_count`."""
zh: """"""
zh: """参考 `max_count`。"""
}
label: {
en: ""
zh: ""
en: "Window Time"
zh: "Window Time"
}
}
@ -1213,4 +1217,201 @@ natively in the EMQX node;<br>
}
}
desc_cluster {
desc {
en: """EMQX nodes can form a cluster to scale up the total capacity.<br>Here holds the configs to instruct how individual nodes can discover each other."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_static {
desc {
en: """Service discovery via static nodes. The new node joins the cluster by connecting to one of the bootstrap nodes."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_mcast {
desc {
en: """Service discovery via UDP multicast."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_dns {
desc {
en: """Service discovery via DNS SRV records."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_etcd {
desc {
en: """Service discovery using 'etcd' service."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_k8s {
desc {
en: """Service discovery via Kubernetes API server."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_node {
desc {
en: """Node name, cookie, config & data directories and the Erlang virtual machine (BEAM) boot parameters."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_db {
desc {
en: """Settings for the embedded database."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_cluster_call {
desc {
en: """Options for the 'cluster call' feature that allows to execute a callback on all nodes in the cluster."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_rpc {
desc {
en: """EMQX uses a library called <code>gen_rpc</code> for inter-broker communication.<br/>Most of the time the default config should work, but in case you need to do performance fine-tuning or experiment a bit, this is where to look."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
desc_log {
desc {
en: """EMQX logging supports multiple sinks for the log events. Each sink is represented by a _log handler_, which can be configured independently."""
zh: """EMQX 日志记录支持日志事件的多个接收器。 每个接收器由一个_log handler_表示可以独立配置。"""
}
label: {
en: "Log"
zh: "日志"
}
}
desc_console_handler {
desc {
en: """Log handler that prints log events to the EMQX console."""
zh: """日志处理进程将日志事件打印到 EMQX 控制台。"""
}
label: {
en: "Console Log Handler"
zh: "控制台日志处理进程"
}
}
desc_log_file_handler {
desc {
en: """Log handler that prints log events to files."""
zh: """日志处理进程将日志事件打印到文件。"""
}
label: {
en: "Files Log Handler"
zh: "文件日志处理进程"
}
}
desc_log_rotation {
desc {
en: """By default, the logs are stored in `./log` directory (for installation from zip file) or in `/var/log/emqx` (for binary installation).<br/>This section of the configuration controls the number of files kept for each log handler."""
zh: """默认情况下,日志存储在 `./log` 目录(用于从 zip 文件安装)或 `/var/log/emqx`(用于二进制安装)。<br/>这部分配置,控制每个日志处理进程保留的文件数量。"""
}
label: {
en: "Log Rotation"
zh: "日志轮换"
}
}
desc_log_overload_kill {
desc {
en: """Log overload kill features an overload protection that activates when the log handlers use too much memory or have too many buffered log messages.<br/>When the overload is detected, the log handler is terminated and restarted after a cooldown period."""
zh: """日志过载终止,具有过载保护功能。当日志处理进程使用过多内存,或者缓存的日志消息过多时该功能被激活。<br/>检测到过载时,日志处理进程将终止,并在冷却期后重新启动。"""
}
label: {
en: "Log Overload Kill"
zh: "日志过载保护"
}
}
desc_log_burst_limit {
desc {
en: """Large bursts of log events produced in a short time can potentially cause problems, such as:
- Log files grow very large
- Log files are rotated too quickly, and useful information gets overwritten
- Overall performance impact on the system
Log burst limit feature can temporarily disable logging to avoid these issues."""
zh: """短时间内产生的大量日志事件可能会导致问题,例如:
- 日志文件变得非常大
- 日志文件轮换过快,有用信息被覆盖
- 对系统的整体性能影响
日志突发限制功能可以暂时禁用日志记录以避免这些问题。"""
}
label: {
en: "Log Burst Limit"
zh: "日志突发限制"
}
}
desc_authorization {
desc {
en: """Settings that control client authorization."""
zh: """"""
}
label: {
en: ""
zh: ""
}
}
}

View File

@ -661,12 +661,12 @@ fields("log") ->
[ {"console_handler", ref("console_handler")}
, {"file_handlers",
sc(map(name, ref("log_file_handler")),
#{desc => "Key-value list of file-based log handlers."})}
#{desc => ?DESC("log_file_handlers")})}
, {"error_logger",
sc(atom(),
#{mapping => "kernel.error_logger",
default => silent,
desc => "Deprecated."
desc => ?DESC("log_error_logger")
})}
];
@ -676,7 +676,7 @@ fields("console_handler") ->
fields("log_file_handler") ->
[ {"file",
sc(file(),
#{ desc => "Name the log file."
#{ desc => ?DESC("log_file_handler_file")
})}
, {"rotation",
sc(ref("log_rotation"),
@ -684,9 +684,7 @@ fields("log_file_handler") ->
, {"max_size",
sc(hoconsc:union([infinity, emqx_schema:bytesize()]),
#{ default => "10MB"
, desc => "This parameter controls log file rotation. "
"The value `infinity` means the log file will grow indefinitely, "
"otherwise the log file will be rotated once it reaches `max_size` in bytes."
, desc => ?DESC("log_file_handler_max_size")
})}
] ++ log_handler_common_confs();
@ -694,12 +692,12 @@ fields("log_rotation") ->
[ {"enable",
sc(boolean(),
#{ default => true
, desc => "Enable log rotation feature."
, desc => ?DESC("log_rotation_enable")
})}
, {"count",
sc(range(1, 2048),
#{ default => 10
, desc => "Maximum number of log files."
, desc => ?DESC("log_rotation_count")
})}
];
@ -707,23 +705,22 @@ fields("log_overload_kill") ->
[ {"enable",
sc(boolean(),
#{ default => true
, desc => "Enable log handler overload kill feature."
, desc => ?DESC("log_overload_kill_enable")
})}
, {"mem_size",
sc(emqx_schema:bytesize(),
#{ default => "30MB"
, desc => "Maximum memory size that the handler process is allowed to use."
, desc => ?DESC("log_overload_kill_mem_size")
})}
, {"qlen",
sc(integer(),
#{ default => 20000
, desc => "Maximum allowed queue length."
, desc => ?DESC("log_overload_kill_qlen")
})}
, {"restart_after",
sc(hoconsc:union([emqx_schema:duration(), infinity]),
#{ default => "5s"
, desc => "If the handler is terminated, it restarts automatically after a "
"delay specified in milliseconds. The value `infinity` prevents restarts."
, desc => ?DESC("log_overload_kill_restart_after")
})}
];
@ -731,19 +728,17 @@ fields("log_burst_limit") ->
[ {"enable",
sc(boolean(),
#{ default => true
, desc => "Enable log burst control feature."
, desc => ?DESC("log_burst_limit_enable")
})}
, {"max_count",
sc(integer(),
#{ default => 10000
, desc => "Maximum number of log events to handle within a `window_time` interval. "
"After the limit is reached, successive events are dropped "
"until the end of the `window_time`."
, desc => ?DESC("log_burst_limit_max_count")
})}
, {"window_time",
sc(emqx_schema:duration(),
#{ default => "1s"
, desc => "See `max_count`."
, desc => ?DESC("log_burst_limit_window_time")
})}
];
@ -751,59 +746,40 @@ fields("authorization") ->
emqx_schema:fields("authorization") ++
emqx_authz_schema:fields("authorization").
desc("cluster") ->
"EMQX nodes can form a cluster to scale up the total capacity.<br>"
"Here holds the configs to instruct how individual nodes "
"can discover each other.";
?DESC("desc_cluster");
desc(cluster_static) ->
"Service discovery via static nodes. The new node joins the cluster by "
"connecting to one of the bootstrap nodes.";
?DESC("desc_cluster_static");
desc(cluster_mcast) ->
"Service discovery via UDP multicast.";
?DESC("desc_cluster_mcast");
desc(cluster_dns) ->
"Service discovery via DNS SRV records.";
?DESC("desc_cluster_dns");
desc(cluster_etcd) ->
"Service discovery using 'etcd' service.";
?DESC("desc_cluster_etcd");
desc(cluster_k8s) ->
"Service discovery via Kubernetes API server.";
?DESC("desc_cluster_k8s");
desc("node") ->
"Node name, cookie, config & data directories "
"and the Erlang virtual machine (BEAM) boot parameters.";
?DESC("desc_node");
desc("db") ->
"Settings for the embedded database.";
?DESC("desc_db");
desc("cluster_call") ->
"Options for the 'cluster call' feature that allows to execute a callback "
"on all nodes in the cluster.";
?DESC("desc_cluster_call");
desc("rpc") ->
"EMQX uses a library called <code>gen_rpc</code> for "
"inter-broker communication.<br/>Most of the time the default config "
"should work, but in case you need to do performance "
"fine-tuning or experiment a bit, this is where to look.";
?DESC("desc_rpc");
desc("log") ->
"EMQX logging supports multiple sinks for the log events."
" Each sink is represented by a _log handler_, which can be configured independently.";
?DESC("desc_log");
desc("console_handler") ->
"Log handler that prints log events to the EMQX console.";
?DESC("desc_console_handler");
desc("log_file_handler") ->
"Log handler that prints log events to files.";
?DESC("desc_log_file_handler");
desc("log_rotation") ->
"By default, the logs are stored in `./log` directory (for installation from zip file)"
" or in `/var/log/emqx` (for binary installation).<br/>"
"This section of the configuration controls the number of files kept for each log handler.";
?DESC("desc_log_rotation");
desc("log_overload_kill") ->
"Log overload kill features an overload protection that activates when"
" the log handlers use too much memory or have too many buffered log messages.<br/>"
"When the overload is detected, the log handler is terminated and restarted after a"
" cooldown period.";
?DESC("desc_log_overload_kill");
desc("log_burst_limit") ->
"Large bursts of log events produced in a short time can potentially cause problems, such as:\n"
" - Log files grow very large\n"
" - Log files are rotated too quickly, and useful information gets overwritten\n"
" - Overall performance impact on the system\n\n"
"Log burst limit feature can temporarily disable logging to avoid these issues.";
?DESC("desc_log_burst_limit");
desc("authorization") ->
"Settings that control client authorization.";
?DESC("desc_authorization");
desc(_) ->
undefined.
@ -913,57 +889,47 @@ log_handler_common_confs() ->
[ {"enable",
sc(boolean(),
#{ default => false
, desc => "Enable this log handler."
, desc => ?DESC("log_file_handler_enable")
})}
, {"level",
sc(log_level(),
#{ default => warning
, desc => "Global log level. This includes the primary log level "
"and all log handlers."
, desc => ?DESC("log_file_handler_level")
})}
, {"time_offset",
sc(string(),
#{ default => "system"
, desc => "The time offset to be used when formatting the timestamp."
, desc => ?DESC("log_file_handler_time_offset")
})}
, {"chars_limit",
sc(hoconsc:union([unlimited, range(1, inf)]),
#{ default => unlimited
, desc => "Set the maximum length of a single log message. "
"If this length is exceeded, the log message will be truncated."
, desc => ?DESC("log_file_handler_chars_limit")
})}
, {"formatter",
sc(hoconsc:enum([text, json]),
#{ default => text
, desc => "Choose log format. <code>text</code> for free text, and "
"<code>json</code> for structured logging."
, desc => ?DESC("log_file_handler_formatter")
})}
, {"single_line",
sc(boolean(),
#{ default => true
, desc => "Print logs in a single line if set to true. "
"Otherwise, log messages may span multiple lines."
, desc => ?DESC("log_file_handler_single_line")
})}
, {"sync_mode_qlen",
sc(integer(),
#{ default => 100
, desc => "As long as the number of buffered log events is lower than this value, "
"all log events are handled asynchronously."
, desc => ?DESC("log_file_handler_sync_mode_qlen")
})}
, {"drop_mode_qlen",
sc(integer(),
#{ default => 3000
, desc => "When the number of buffered log events is larger than this value, "
"the new log events are dropped.<br/>"
"When drop mode is activated or deactivated, a message is printed in "
"the logs."
, desc => ?DESC("log_file_handler_drop_mode_qlen")
})}
, {"flush_qlen",
sc(integer(),
#{ default => 8000
, desc => "If the number of buffered log events grows larger than this threshold, "
"a flush (delete) operation takes place. "
"To flush events, the handler discards the buffered log messages without logging."
, desc => ?DESC("log_file_handler_flush_qlen")
})}
, {"overload_kill",
sc(ref("log_overload_kill"), #{})}
@ -972,15 +938,12 @@ log_handler_common_confs() ->
, {"supervisor_reports",
sc(hoconsc:enum([error, progress]),
#{ default => error
, desc => "Type of supervisor reports that are logged.\n"
" - `error`: only log errors in the Erlang processes.\n"
" - `progress`: log process startup."
, desc => ?DESC("log_file_handler_supervisor_reports")
})}
, {"max_depth",
sc(hoconsc:union([unlimited, non_neg_integer()]),
#{ default => 100
, desc => "Maximum depth for Erlang term log formatting "
"and Erlang process message queue inspection."
, desc => ?DESC("log_file_handler_max_depth")
})}
].

View File

@ -3,7 +3,7 @@ emqx_connector_schema_lib {
ssl {
desc {
en: "SSL connection settings."
zh: "SSL 连接设置。"
zh: "启用 SSL 连接。"
}
label: {
en: "Enable SSL"