aboutsummaryrefslogtreecommitdiffstats
path: root/util/startup.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-04-05 17:53:51 +0200
committerKim Alvefur <zash@zash.se>2018-04-05 17:53:51 +0200
commitb594f3b843e1d25fa163256594f0936eb511e1aa (patch)
tree6c3687a05a423518c86f5c43cfcfb2a76355230a /util/startup.lua
parenteacc7b0dd37afa27aa9c1b61f698181a6e8fee76 (diff)
downloadprosody-b594f3b843e1d25fa163256594f0936eb511e1aa.tar.gz
prosody-b594f3b843e1d25fa163256594f0936eb511e1aa.zip
util.startup: Set up event hooks for reloading logging here instead of in loggingmanager to simplify startup dependencies
Diffstat (limited to 'util/startup.lua')
-rw-r--r--util/startup.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/util/startup.lua b/util/startup.lua
index 0d7cb08a..0b62249b 100644
--- a/util/startup.lua
+++ b/util/startup.lua
@@ -84,7 +84,12 @@ end
function startup.init_logging()
-- Initialize logging
- require "core.loggingmanager"
+ local loggingmanager = require "core.loggingmanager"
+ loggingmanager.reload_logging();
+ prosody.events.add_handler("reopen-log-files", function ()
+ loggingmanager.reload_logging();
+ prosody.events.fire_event("logging-reloaded");
+ end);
end
function startup.log_dependency_warnings()