68 lines
2.2 KiB
Plaintext
68 lines
2.2 KiB
Plaintext
[
|
||
{sdlan, [
|
||
|
||
{http_server, [
|
||
{port, 19082},
|
||
{acceptors, 500},
|
||
{max_connections, 10240},
|
||
{backlog, 10240}
|
||
]},
|
||
|
||
{tcp_server, [
|
||
{port, 19083},
|
||
{acceptors, 500},
|
||
{max_connections, 10240},
|
||
{backlog, 10240}
|
||
]},
|
||
|
||
%% 网络带宽, 单位为: kb
|
||
{band_width, 2048},
|
||
|
||
{stun_servers, [{'sdlan_stun:1:1', 1265}, {'sdlan_stun:1:2', 1266}]},
|
||
{stun_assist, {{47,98,178,3}, 1266}},
|
||
|
||
{api_url, "http://127.0.0.1:19082/test/"}
|
||
|
||
]},
|
||
|
||
{throttle, [
|
||
{driver, throttle_ets},
|
||
{access_context, sync_transaction}
|
||
]},
|
||
|
||
%% 系统日志配置,系统日志为lager, 支持日志按日期自动分割
|
||
{lager, [
|
||
{colored, true},
|
||
%% Whether to write a crash log, and where. Undefined means no crash logger.
|
||
{crash_log, "trade_hub.crash.log"},
|
||
%% Maximum size in bytes of events in the crash log - defaults to 65536
|
||
{crash_log_msg_size, 65536},
|
||
%% Maximum size of the crash log in bytes, before its rotated, set
|
||
%% to 0 to disable rotation - default is 0
|
||
{crash_log_size, 10485760},
|
||
%% What time to rotate the crash log - default is no time
|
||
%% rotation. See the README for a description of this format.
|
||
{crash_log_date, "$D0"},
|
||
%% Number of rotated crash logs to keep, 0 means keep only the
|
||
%% current one - default is 0
|
||
{crash_log_count, 5},
|
||
%% Whether to redirect error_logger messages into lager - defaults to true
|
||
{error_logger_redirect, true},
|
||
|
||
%% How big the gen_event mailbox can get before it is switched into sync mode
|
||
{async_threshold, 20},
|
||
%% Switch back to async mode, when gen_event mailbox size decrease from `async_threshold'
|
||
%% to async_threshold - async_threshold_window
|
||
{async_threshold_window, 5},
|
||
|
||
{handlers, [
|
||
%% debug | info | warning | error, 日志级别
|
||
{lager_console_backend, debug},
|
||
{lager_file_backend, [{file, "debug.log"}, {level, debug}, {size, 314572800}]},
|
||
{lager_file_backend, [{file, "notice.log"}, {level, notice}, {size, 314572800}]},
|
||
{lager_file_backend, [{file, "error.log"}, {level, error}, {size, 314572800}]},
|
||
{lager_file_backend, [{file, "info.log"}, {level, info}, {size, 314572800}]}
|
||
]}
|
||
]}
|
||
].
|