# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1684083746 -7200
# Node ID 7d9e26003b05ea1c8a5f0d09a3638e85abcda84e
# Parent  8c786880e28d7ca94cfc5e6b47ef37c5cff2935a
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

diff -r 8c786880e28d -r 7d9e26003b05 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