diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-03-17 10:20:23 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-03-17 10:20:23 +0000 |
commit | a946bdf4ae58e6aa2dea7915a5da67099a6e5c63 (patch) | |
tree | 7697608ad8d10b30ec5cfcc71368e81710e1868d /util/logger.lua | |
parent | 9f34801aba7249016e5471ecdeb1b4823ad9d38e (diff) | |
download | prosody-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/logger.lua')
-rw-r--r-- | util/logger.lua | 1 |
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) |