diff plugins/mod_admin_shell.lua @ 14031:0dd917830523

mod_admin_shell: Include timestamps with logs in debug:ping() Makes it easier to see get a feel for if it pauses on something and how long things like DNS lookups and connection attempts take.
author Kim Alvefur <zash@zash.se>
date Tue, 06 Jan 2026 19:14:47 +0100
parents 071779f7645c
children f20bb1c53652
line wrap: on
line diff
--- a/plugins/mod_admin_shell.lua	Tue Jan 06 19:13:20 2026 +0100
+++ b/plugins/mod_admin_shell.lua	Tue Jan 06 19:14:47 2026 +0100
@@ -20,6 +20,7 @@
 local schema = require "prosody.util.jsonschema";
 local st = require "prosody.util.stanza";
 local parse_args = require "prosody.util.argparse".parse;
+local dt = require "prosody.util.datetime";
 
 local _G = _G;
 
@@ -2533,7 +2534,7 @@
 	local sink = logger.add_simple_sink(function (source, level, message)
 		if writing then return; end
 		writing = true;
-		print(source, level, message);
+		print(dt.time(time.now()), source, level, message);
 		writing = false;
 	end);