aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2023-05-14 19:02:26 +0200
committerKim Alvefur <zash@zash.se>2023-05-14 19:02:26 +0200
commitc71ab7f1ef1ede387586af1e9160761dc2c1bfa3 (patch)
treeff7b85d01f0da09dd0645c094f770041d99a7626
parentf3ec84d5ef0e0dc6c1aca1ae26737ae9d13fb808 (diff)
downloadprosody-c71ab7f1ef1ede387586af1e9160761dc2c1bfa3.tar.gz
prosody-c71ab7f1ef1ede387586af1e9160761dc2c1bfa3.zip
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
-rw-r--r--plugins/mod_admin_shell.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_admin_shell.lua b/plugins/mod_admin_shell.lua
index cb3b7bac..199bdef0 100644
--- a/plugins/mod_admin_shell.lua
+++ b/plugins/mod_admin_shell.lua
@@ -1929,6 +1929,9 @@ def_env.debug = {};
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