Software /
code /
prosody-modules
Comparison
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 |
comparison
equal
deleted
inserted
replaced
3757:971417eedfee | 3758:900ea02ab00b |
---|---|
40 }; | 40 }; |
41 send(json.encode(payload)); | 41 send(json.encode(payload)); |
42 end | 42 end |
43 end | 43 end |
44 | 44 |
45 function module.unload() | |
46 -- deregister | |
47 require"core.loggingmanager".register_sink_type("json", nil); | |
48 end | |
49 | |
45 require"core.loggingmanager".register_sink_type("json", sink_maker); | 50 require"core.loggingmanager".register_sink_type("json", sink_maker); |