Changeset

13105:7d9e26003b05

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
author Kim Alvefur <zash@zash.se>
date Sun, 14 May 2023 19:02:26 +0200
parents 13104:8c786880e28d
children 13106:8c762a30eae0
files plugins/mod_admin_shell.lua
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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