aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2022-03-17 10:20:23 +0000
committerMatthew Wild <mwild1@gmail.com>2022-03-17 10:20:23 +0000
commita946bdf4ae58e6aa2dea7915a5da67099a6e5c63 (patch)
tree7697608ad8d10b30ec5cfcc71368e81710e1868d /util
parent9f34801aba7249016e5471ecdeb1b4823ad9d38e (diff)
downloadprosody-a946bdf4ae58e6aa2dea7915a5da67099a6e5c63.tar.gz
prosody-a946bdf4ae58e6aa2dea7915a5da67099a6e5c63.zip
util.logger: Return sink_function from add_simple_sink()
This allows a simple sink to be later removed via remove_sink()
Diffstat (limited to 'util')
-rw-r--r--util/logger.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/logger.lua b/util/logger.lua
index a94a1ee1..148b98dc 100644
--- a/util/logger.lua
+++ b/util/logger.lua
@@ -79,6 +79,7 @@ local function add_simple_sink(simple_sink_function, levels)
for _, level in ipairs(levels or {"debug", "info", "warn", "error"}) do
add_level_sink(level, sink_function);
end
+ return sink_function;
end
local function remove_sink(sink_function)