Changeset

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
parents 9742:18eca6afb367
children 9763:982529dd0bed
files util/startup.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
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");