mod_admin_shell: Allow logging HTTP events with debug:logevents("http")
authorKim Alvefur <zash@zash.se>
Sun, 14 May 2023 19:02:26 +0200
changeset 13109 7d9e26003b05
parent 13108 8c786880e28d
child 13110 8c762a30eae0
mod_admin_shell: Allow logging HTTP events with debug:logevents("http") Mirroring debug:events("http"), and to replace the "Firing event: GET /" log lines in net.http.server
plugins/mod_admin_shell.lua
--- a/plugins/mod_admin_shell.lua	Sun May 14 19:01:01 2023 +0200
+++ b/plugins/mod_admin_shell.lua	Sun May 14 19:02:26 2023 +0200
@@ -1929,6 +1929,9 @@
 function def_env.debug:logevents(host)
 	if host == "*" then
 		helpers.log_events(prosody.events);
+	elseif host == "http" then
+		helpers.log_events(require "prosody.net.http.server"._events);
+		return true
 	else
 		helpers.log_host_events(host);
 	end