mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-24 16:23:40 +01:00
Avoid custom loglevels processing for lager
This commit is contained in:
parent
597934637c
commit
8a9743ab3b
@ -37,7 +37,7 @@
|
|||||||
-spec get_log_path() -> string().
|
-spec get_log_path() -> string().
|
||||||
-spec reopen_log() -> ok.
|
-spec reopen_log() -> ok.
|
||||||
-spec get() -> {loglevel(), atom(), string()}.
|
-spec get() -> {loglevel(), atom(), string()}.
|
||||||
-spec set(loglevel()) -> {module, module()}.
|
-spec set(loglevel() | {loglevel(), list()}) -> {module, module()}.
|
||||||
|
|
||||||
%%%===================================================================
|
%%%===================================================================
|
||||||
%%% API
|
%%% API
|
||||||
@ -97,7 +97,7 @@ get() ->
|
|||||||
debug -> {5, debug, "Debug"}
|
debug -> {5, debug, "Debug"}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
set(LogLevel) ->
|
set(LogLevel) when is_integer(LogLevel) ->
|
||||||
LagerLogLevel = case LogLevel of
|
LagerLogLevel = case LogLevel of
|
||||||
0 -> none;
|
0 -> none;
|
||||||
1 -> critical;
|
1 -> critical;
|
||||||
@ -120,6 +120,9 @@ set(LogLevel) ->
|
|||||||
ok
|
ok
|
||||||
end, gen_event:which_handlers(lager_event))
|
end, gen_event:which_handlers(lager_event))
|
||||||
end,
|
end,
|
||||||
|
{module, lager};
|
||||||
|
set({_LogLevel, _}) ->
|
||||||
|
error_logger:error_msg("custom loglevels are not supported for 'lager'"),
|
||||||
{module, lager}.
|
{module, lager}.
|
||||||
|
|
||||||
-else.
|
-else.
|
||||||
|
Loading…
Reference in New Issue
Block a user