feat(hocon): convert config format of rpc and log to hocon
This commit is contained in:
parent
092c5455c8
commit
c7cbe819ed
|
@ -316,13 +316,15 @@ node: {
|
|||
backtrace_depth: 16
|
||||
}
|
||||
|
||||
##--------------------------------------------------------------------
|
||||
## RPC
|
||||
##--------------------------------------------------------------------
|
||||
|
||||
## CONFIG_SECTION_BGN=rpc ======================================================
|
||||
|
||||
rpc: {
|
||||
## RPC Mode.
|
||||
##
|
||||
## Value: sync | async
|
||||
rpc.mode = async
|
||||
mode: async
|
||||
|
||||
## Max batch size of async RPC requests.
|
||||
##
|
||||
|
@ -330,7 +332,7 @@ rpc.mode = async
|
|||
## Zero or negative value disables rpc batching.
|
||||
##
|
||||
## NOTE: RPC batch won't work when rpc.mode = sync
|
||||
rpc.async_batch_size = 256
|
||||
async_batch_size: 256
|
||||
|
||||
## RPC port discovery
|
||||
##
|
||||
|
@ -343,7 +345,7 @@ rpc.async_batch_size = 256
|
|||
## then the listening port will be `5370 + <N>`
|
||||
##
|
||||
## Defaults to `stateless`.
|
||||
rpc.port_discovery = stateless
|
||||
port_discovery: stateless
|
||||
|
||||
## TCP port number for RPC server to listen on.
|
||||
##
|
||||
|
@ -352,68 +354,70 @@ rpc.port_discovery = stateless
|
|||
## NOTE: All nodes in the cluster should agree to this same config.
|
||||
##
|
||||
## Value: Port [1024-65535]
|
||||
#rpc.tcp_server_port = 5369
|
||||
## tcp_server_port: 5369
|
||||
|
||||
## Number of outgoing RPC connections.
|
||||
##
|
||||
## Value: Interger [0-256]
|
||||
## Default = 1
|
||||
#rpc.tcp_client_num = 1
|
||||
## Default: 1
|
||||
## tcp_client_num: 1
|
||||
|
||||
## RCP Client connect timeout.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.connect_timeout = 5s
|
||||
connect_timeout: 5s
|
||||
|
||||
## TCP send timeout of RPC client and server.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.send_timeout = 5s
|
||||
send_timeout: 5s
|
||||
|
||||
## Authentication timeout
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.authentication_timeout = 5s
|
||||
authentication_timeout: 5s
|
||||
|
||||
## Default receive timeout for call() functions
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.call_receive_timeout = 15s
|
||||
call_receive_timeout: 15s
|
||||
|
||||
## Socket idle keepalive.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.socket_keepalive_idle = 900s
|
||||
socket_keepalive_idle: 900s
|
||||
|
||||
## TCP Keepalive probes interval.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.socket_keepalive_interval = 75s
|
||||
socket_keepalive_interval: 75s
|
||||
|
||||
## Probes lost to close the connection
|
||||
##
|
||||
## Value: Integer
|
||||
rpc.socket_keepalive_count = 9
|
||||
socket_keepalive_count: 9
|
||||
|
||||
## Size of TCP send buffer.
|
||||
##
|
||||
## Value: Bytes
|
||||
rpc.socket_sndbuf = 1MB
|
||||
socket_sndbuf: 1MB
|
||||
|
||||
## Size of TCP receive buffer.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.socket_recbuf = 1MB
|
||||
socket_recbuf: 1MB
|
||||
|
||||
## Size of user-level software socket buffer.
|
||||
##
|
||||
## Value: Seconds
|
||||
rpc.socket_buffer = 1MB
|
||||
socket_buffer: 1MB
|
||||
}
|
||||
|
||||
## CONFIG_SECTION_END=rpc ======================================================
|
||||
|
||||
## CONFIG_SECTION_BGN=logger ===================================================
|
||||
##--------------------------------------------------------------------
|
||||
## Log
|
||||
##--------------------------------------------------------------------
|
||||
|
||||
log: {
|
||||
## Where to emit the logs.
|
||||
## Enable the console (standard output) logs.
|
||||
##
|
||||
|
@ -421,7 +425,7 @@ rpc.socket_buffer = 1MB
|
|||
## - file: write logs only to file
|
||||
## - console: write logs only to standard I/O
|
||||
## - both: write logs both to file and standard I/O
|
||||
log.to = file
|
||||
to: file
|
||||
|
||||
## The log severity level.
|
||||
##
|
||||
|
@ -431,19 +435,19 @@ log.to = file
|
|||
## this level will be logged.
|
||||
##
|
||||
## Default: warning
|
||||
log.level = warning
|
||||
level: warning
|
||||
|
||||
## Timezone offset to display in logs
|
||||
## Value:
|
||||
## - "system" use system zone
|
||||
## - "utc" for Universal Coordinated Time (UTC)
|
||||
## - "+hh:mm" or "-hh:mm" for a specified offset
|
||||
log.time_offset = system
|
||||
time_offset: system
|
||||
|
||||
## The dir for log files.
|
||||
##
|
||||
## Value: Folder
|
||||
log.dir = "{{ platform_log_dir }}"
|
||||
dir: "{{ platform_log_dir }}"
|
||||
|
||||
## The log filename for logs of level specified in "log.level".
|
||||
##
|
||||
|
@ -452,49 +456,49 @@ log.dir = "{{ platform_log_dir }}"
|
|||
##
|
||||
## Value: String
|
||||
## Default: emqx.log
|
||||
log.file = emqx.log
|
||||
file: emqx.log
|
||||
|
||||
## Limits the total number of characters printed for each log event.
|
||||
##
|
||||
## Value: Integer
|
||||
## Default: No Limit
|
||||
#log.chars_limit = 8192
|
||||
## chars_limit: 8192
|
||||
|
||||
## Maximum depth for Erlang term log formatting
|
||||
## and Erlang process message queue inspection.
|
||||
##
|
||||
## Value: Integer or 'unlimited' (without quotes)
|
||||
## Default: 80
|
||||
#log.max_depth = 80
|
||||
## max_depth: 80
|
||||
|
||||
## Log formatter
|
||||
## Value: text | json
|
||||
#log.formatter = text
|
||||
## formatter: text
|
||||
|
||||
## Log to single line
|
||||
## Value: Boolean
|
||||
#log.single_line = true
|
||||
## single_line: true
|
||||
|
||||
## Enables the log rotation.
|
||||
## With this enabled, new log files will be created when the current
|
||||
## log file is full, max to `log.rotation.size` files will be created.
|
||||
## log file is full, max to `rotation.size` files will be created.
|
||||
##
|
||||
## Value: on | off
|
||||
## Default: on
|
||||
log.rotation.enable = on
|
||||
rotation.enable: on
|
||||
|
||||
## Maximum size of each log file.
|
||||
##
|
||||
## Value: Number
|
||||
## Default: 10M
|
||||
## Supported Unit: KB | MB | GB
|
||||
log.rotation.size = 10MB
|
||||
rotation.size: 10MB
|
||||
|
||||
## Maximum rotation count of log files.
|
||||
##
|
||||
## Value: Number
|
||||
## Default: 5
|
||||
log.rotation.count = 5
|
||||
rotation.count: 5
|
||||
|
||||
## To create additional log files for specific log levels.
|
||||
##
|
||||
|
@ -505,8 +509,8 @@ log.rotation.count = 5
|
|||
## Note: Log files for a specific log level will only contain all the logs
|
||||
## that higher than or equal to that level
|
||||
##
|
||||
#log.info.file = info.log
|
||||
#log.error.file = error.log
|
||||
## info.file: info.log
|
||||
## error.file: error.log
|
||||
|
||||
## The max allowed queue length before switching to sync mode.
|
||||
##
|
||||
|
@ -515,7 +519,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 100
|
||||
##
|
||||
#log.sync_mode_qlen = 100
|
||||
## sync_mode_qlen: 100
|
||||
|
||||
## The max allowed queue length before switching to drop mode.
|
||||
##
|
||||
|
@ -525,7 +529,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 3000
|
||||
##
|
||||
#log.drop_mode_qlen = 3000
|
||||
## drop_mode_qlen: 3000
|
||||
|
||||
## The max allowed queue length before switching to flush mode.
|
||||
##
|
||||
|
@ -536,7 +540,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 8000
|
||||
##
|
||||
#log.flush_qlen = 8000
|
||||
## flush_qlen: 8000
|
||||
|
||||
## Kill the log handler when it gets overloaded.
|
||||
##
|
||||
|
@ -548,7 +552,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: on
|
||||
##
|
||||
#log.overload_kill = on
|
||||
## overload_kill: on
|
||||
|
||||
## The max allowed queue length before killing the log hanlder.
|
||||
##
|
||||
|
@ -558,7 +562,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 20000
|
||||
##
|
||||
#log.overload_kill_qlen = 20000
|
||||
## overload_kill_qlen: 20000
|
||||
|
||||
## The max allowed memory size before killing the log hanlder.
|
||||
##
|
||||
|
@ -568,7 +572,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 30MB
|
||||
##
|
||||
#log.overload_kill_mem_size = 30MB
|
||||
## overload_kill_mem_size: 30MB
|
||||
|
||||
## Restart the log hanlder after some seconds.
|
||||
##
|
||||
|
@ -578,7 +582,7 @@ log.rotation.count = 5
|
|||
##
|
||||
## Default: 5s
|
||||
##
|
||||
#log.overload_kill_restart_after = 5s
|
||||
## overload_kill_restart_after: 5s
|
||||
|
||||
## Max burst count and time window for burst control.
|
||||
##
|
||||
|
@ -600,9 +604,8 @@ log.rotation.count = 5
|
|||
## Value: MaxBurstCount,TimeWindow
|
||||
## Default: disabled
|
||||
##
|
||||
#log.burst_limit = "20000, 1s"
|
||||
|
||||
## CONFIG_SECTION_END=logger ===================================================
|
||||
## burst_limit: "20000, 1s"
|
||||
}
|
||||
|
||||
##--------------------------------------------------------------------
|
||||
## Authentication/Access Control
|
||||
|
|
Loading…
Reference in New Issue