Remove simple log handler at startup (#2000)

The simple logger handler is not removed if we set the `log.to=file` in
emqx.conf.

This might be an issue of OTP logger:
https://bugs.erlang.org/browse/ERL-788

I set the error_logger to silent as a workaround.
This commit is contained in:
Shawn 2018-11-30 14:29:34 +08:00 committed by GitHub
parent 21ed012a0c
commit 76d5dedb3b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -426,12 +426,18 @@ end}.
{datatype, file}
]}.
{mapping, "sasl", "sasl.sasl_error_logger", [
{mapping, "log.sasl", "sasl.sasl_error_logger", [
{default, off},
{datatype, flag},
hidden
]}.
{mapping, "log.error_logger", "kernel.error_logger", [
{default, silent},
{datatype, {enum, [silent]}},
hidden
]}.
{translation, "emqx.primary_log_level", fun(Conf) ->
cuttlefish:conf_get("log.level", Conf)
end}.