aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-22 14:38:40 +0200
committerKim Alvefur <zash@zash.se>2018-09-22 14:38:40 +0200
commitcd7bd0335273995b9b0f01e2f2426df8ad707845 (patch)
tree90abc2ae02acd3fe81d4cc3d4db95e2a740d868f
parent0c533092dda5531483033bab8bed0ab960dd9775 (diff)
downloadprosody-cd7bd0335273995b9b0f01e2f2426df8ad707845.tar.gz
prosody-cd7bd0335273995b9b0f01e2f2426df8ad707845.zip
mod_scansion_record: Generate a header with hostname and timestamp
-rw-r--r--plugins/mod_scansion_record.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua
index 6e93aead..ee967271 100644
--- a/plugins/mod_scansion_record.lua
+++ b/plugins/mod_scansion_record.lua
@@ -6,6 +6,7 @@ local full_jids = {};
local filters = require "util.filters";
local id = require "util.id";
+local dt = require "util.datetime";
local dm = require "util.datamanager";
local record_id = id.medium():lower();
@@ -77,7 +78,15 @@ module:hook("resource-bind", function (event)
filters.add_filter(session, "stanzas/out", record_stanza_out);
end);
+record_header("# mod_scansion_record on host '"..module.host.."' recording started "..dt.datetime().."\n\n");
+
+record[[
+-----
+
+]]
+
module:hook_global("server-stopping", function ()
+ record("# recording ended on "..dt.datetime().."\n");
module:log("info", "Scansion recording available in %s", record_file);
scan:close();
head:close()