fix config
This commit is contained in:
parent
6df4698ed8
commit
7b92b8239f
@ -8,7 +8,7 @@
|
||||
]},
|
||||
|
||||
{ssl_server, [
|
||||
{port, 443},
|
||||
{port, 1443},
|
||||
{acceptors, 5},
|
||||
{max_connections, 1024},
|
||||
{backlog, 1024}
|
||||
|
||||
77
config/sys-test.config
Normal file
77
config/sys-test.config
Normal file
@ -0,0 +1,77 @@
|
||||
[
|
||||
{iot, [
|
||||
{http_server, [
|
||||
{port, 18090},
|
||||
{acceptors, 5},
|
||||
{max_connections, 1024},
|
||||
{backlog, 1024}
|
||||
]},
|
||||
|
||||
{ssl_server, [
|
||||
{port, 1443},
|
||||
{acceptors, 5},
|
||||
{max_connections, 1024},
|
||||
{backlog, 1024}
|
||||
]},
|
||||
|
||||
{udp_server, [
|
||||
{port, 18080}
|
||||
]},
|
||||
|
||||
{api_url, "http://127.0.0.1/api/v1"}
|
||||
]},
|
||||
|
||||
{endpoint, [
|
||||
%% 支持的协议
|
||||
{endpoints, [
|
||||
{root_dir, "/usr/local/code/database/"},
|
||||
{support_protocols, [
|
||||
http
|
||||
]}
|
||||
]},
|
||||
|
||||
{endpoint_log, [
|
||||
{path, "${endpoint_root}/endpoint_log/unmatched_publish.log"},
|
||||
{max_bytes, 10485760},
|
||||
{max_files, 10}
|
||||
]}
|
||||
]},
|
||||
|
||||
%% 系统日志配置,使用 OTP logger
|
||||
{kernel, [
|
||||
%% 设置 Logger 的 primary log level
|
||||
{logger_level, debug},
|
||||
{logger, [
|
||||
{handler, default, logger_std_h,
|
||||
#{
|
||||
level => debug,
|
||||
filter_default => stop,
|
||||
filters => [
|
||||
{iot_domain, {fun logger_filters:domain/2, {log, sub, [iot]}}},
|
||||
{endpoint_domain, {fun logger_filters:domain/2, {log, sub, [endpoint]}}}
|
||||
],
|
||||
formatter => {logger_formatter, #{template => [time, " [", level, "] ", msg, "\n"]}}
|
||||
}
|
||||
},
|
||||
|
||||
{handler, disk, logger_disk_log_h,
|
||||
#{
|
||||
level => debug,
|
||||
filter_default => stop,
|
||||
filters => [
|
||||
{iot_domain, {fun logger_filters:domain/2, {log, sub, [iot]}}},
|
||||
{endpoint_domain, {fun logger_filters:domain/2, {log, sub, [endpoint]}}}
|
||||
],
|
||||
config => #{
|
||||
file => "log/debug.log",
|
||||
max_no_files => 10,
|
||||
max_no_bytes => 524288000
|
||||
},
|
||||
formatter => {logger_formatter, #{template => [time, " [", level, "] ", msg, "\n"]}}
|
||||
}
|
||||
}
|
||||
|
||||
]}
|
||||
]}
|
||||
|
||||
].
|
||||
@ -19,7 +19,8 @@
|
||||
endpoint,
|
||||
sasl]},
|
||||
|
||||
{mode, dev},
|
||||
{include_erts, true},
|
||||
{mode, prod},
|
||||
%{mode, prod},
|
||||
|
||||
%% automatically picked up if the files
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user