mirror of
https://github.com/processone/ejabberd.git
synced 2024-12-26 17:38:45 +01:00
Disable SASL error logger if lager is enabled
This commit is contained in:
parent
8fae4748a1
commit
ffdb39d269
@ -62,6 +62,8 @@ get_log_path() ->
|
|||||||
-ifdef(LAGER).
|
-ifdef(LAGER).
|
||||||
|
|
||||||
start() ->
|
start() ->
|
||||||
|
application:load(sasl),
|
||||||
|
application:set_env(sasl, sasl_error_logger, false),
|
||||||
application:load(lager),
|
application:load(lager),
|
||||||
ConsoleLog = get_log_path(),
|
ConsoleLog = get_log_path(),
|
||||||
Dir = filename:dirname(ConsoleLog),
|
Dir = filename:dirname(ConsoleLog),
|
||||||
@ -82,8 +84,7 @@ reopen_log() ->
|
|||||||
whereis(lager_event) ! {rotate, File};
|
whereis(lager_event) ! {rotate, File};
|
||||||
(_) ->
|
(_) ->
|
||||||
ok
|
ok
|
||||||
end, gen_event:which_handlers(lager_event)),
|
end, gen_event:which_handlers(lager_event)).
|
||||||
reopen_sasl_log().
|
|
||||||
|
|
||||||
get() ->
|
get() ->
|
||||||
case lager:get_loglevel(lager_console_backend) of
|
case lager:get_loglevel(lager_console_backend) of
|
||||||
@ -145,8 +146,6 @@ get() ->
|
|||||||
set(LogLevel) ->
|
set(LogLevel) ->
|
||||||
p1_loglevel:set(LogLevel).
|
p1_loglevel:set(LogLevel).
|
||||||
|
|
||||||
-endif.
|
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% Internal functions
|
%%% Internal functions
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
@ -179,3 +178,5 @@ get_sasl_error_logger_type () ->
|
|||||||
{ok, Bad} -> exit ({bad_config, {sasl, {errlog_type, Bad}}});
|
{ok, Bad} -> exit ({bad_config, {sasl, {errlog_type, Bad}}});
|
||||||
_ -> all
|
_ -> all
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
-endif.
|
||||||
|
Loading…
Reference in New Issue
Block a user