mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-20 16:15:59 +01:00
Config reload should update loger settings part 2
This commit is contained in:
parent
06675e4fb2
commit
c69884fa3f
@ -111,6 +111,9 @@ reload() ->
|
||||
ejabberd_hooks:run(host_down, [Host])
|
||||
end, DelHosts),
|
||||
ejabberd_hooks:run(config_reloaded, []),
|
||||
% logger is started too early to be able to use hooks, so
|
||||
% we need to call it separately
|
||||
ejabberd_logger:config_reloaded(),
|
||||
delete_host_options(DelHosts),
|
||||
?INFO_MSG("Configuration reloaded successfully", []);
|
||||
Err ->
|
||||
|
@ -27,9 +27,9 @@
|
||||
|
||||
%% API
|
||||
-export([start/0, get/0, set/1, get_log_path/0, flush/0]).
|
||||
-export([convert_loglevel/1, loglevels/0, set_modules_fully_logged/1]).
|
||||
-export([convert_loglevel/1, loglevels/0, set_modules_fully_logged/1, config_reloaded/0]).
|
||||
-ifndef(LAGER).
|
||||
-export([progress_filter/2, config_reloaded/0]).
|
||||
-export([progress_filter/2]).
|
||||
-endif.
|
||||
%% Deprecated functions
|
||||
-export([restart/0, reopen_log/0, rotate_log/0]).
|
||||
@ -185,6 +185,9 @@ restart() ->
|
||||
application:stop(lager),
|
||||
start(Level).
|
||||
|
||||
config_reloaded() ->
|
||||
ok.
|
||||
|
||||
reopen_log() ->
|
||||
ok.
|
||||
|
||||
@ -266,7 +269,6 @@ start(Level) ->
|
||||
EjabberdLog = get_log_path(),
|
||||
Dir = filename:dirname(EjabberdLog),
|
||||
ErrorLog = filename:join([Dir, "error.log"]),
|
||||
ejabberd_hooks:add(config_reloaded, ?MODULE, config_reloaded, 50),
|
||||
LogRotateSize = get_integer_env(log_rotate_size, 10*1024*1024),
|
||||
LogRotateCount = get_integer_env(log_rotate_count, 1),
|
||||
LogBurstLimitWindowTime = get_integer_env(log_burst_limit_window_time, 1000),
|
||||
|
Loading…
Reference in New Issue
Block a user