mod_traceback/mod_traceback.lua
author Matthew Wild <mwild1@gmail.com>
Sat, 24 Sep 2022 09:26:26 +0100
changeset 5063 5f1120c284c5
parent 2777 7a4e8dbbd30d
child 5855 dde9d21a599f
permissions -rw-r--r--
mod_cloud_notify_extensions: Add note about dependency Noting here because people might not click through to see it on the mod_cloud_notify_encrypted page.

module:set_global();

local traceback = require "util.debug".traceback;

require"util.signal".signal(module:get_option_string(module.name, "SIGUSR1"), function ()
	module:log("info", "Received SIGUSR1, writing traceback");
	local f = io.open(prosody.paths.data.."/traceback.txt", "a+");
	f:write(traceback(), "\n");
	f:close();
end);