Diff

util/startup.lua @ 9762:34988a408b74 0.11

util.startup: Always reload logging after config (fixes #1284) This chancged in 6e24a69b03af likely because of confusion about the `reopen-log-files` event which was fired but never hooked.
author Kim Alvefur <zash@zash.se>
date Sun, 06 Jan 2019 12:14:42 +0100
parent 9214:8b2b8f1a911f
child 9873:dfaeea570f7e
child 10389:dbb8dae58265
line wrap: on
line diff
--- a/util/startup.lua	Sat Dec 29 21:47:51 2018 +0100
+++ b/util/startup.lua	Sun Jan 06 12:14:42 2019 +0100
@@ -87,6 +87,9 @@
 	-- Initialize logging
 	local loggingmanager = require "core.loggingmanager"
 	loggingmanager.reload_logging();
+	prosody.events.add_handler("config-reloaded", function ()
+		prosody.events.fire_event("reopen-log-files");
+	end);
 	prosody.events.add_handler("reopen-log-files", function ()
 		loggingmanager.reload_logging();
 		prosody.events.fire_event("logging-reloaded");