Software /
code /
prosody-modules
Diff
mod_log_json/mod_log_json.lua @ 3758:900ea02ab00b
mod_log_json: Deregister log sink on unload
Clean up after itself on unload. This also helps reinitialize the sink
on reload.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 23 Nov 2019 04:53:16 +0100 |
parent | 3748:27abf3b6819a |
child | 4462:4356088ad675 |
line wrap: on
line diff
--- a/mod_log_json/mod_log_json.lua Sat Nov 23 04:52:43 2019 +0100 +++ b/mod_log_json/mod_log_json.lua Sat Nov 23 04:53:16 2019 +0100 @@ -42,4 +42,9 @@ end end +function module.unload() + -- deregister + require"core.loggingmanager".register_sink_type("json", nil); +end + require"core.loggingmanager".register_sink_type("json", sink_maker);