From ce17a974fc2023c1e1d3f903ce0fbb4fce6ef104 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 6 Jan 2019 12:14:42 +0100 Subject: 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. --- util/startup.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/util/startup.lua b/util/startup.lua index e92867dc..c101c290 100644 --- a/util/startup.lua +++ b/util/startup.lua @@ -87,6 +87,9 @@ function startup.init_logging() -- 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"); -- cgit v1.2.3 From 1e9a016034d106b7f4f97b0cd11d88fb97d5b120 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sun, 6 Jan 2019 12:17:00 +0100 Subject: mod_posix: Don't reload logging twice See 18eca6afb367 --- plugins/mod_posix.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mod_posix.lua b/plugins/mod_posix.lua index 825d3be0..23df4d23 100644 --- a/plugins/mod_posix.lua +++ b/plugins/mod_posix.lua @@ -172,7 +172,7 @@ if have_signal then signal.signal("SIGHUP", function () module:log("info", "Received SIGHUP"); prosody.reload_config(); - prosody.reopen_logfiles(); + -- this also reloads logging end); signal.signal("SIGINT", function () -- cgit v1.2.3