Software /
code /
prosody-modules
Changeset
5491:7842502c1157
mod_http_debug: Log some extended info about requests
If you point something external at this module, you don't get the
response body back, hence it can be useful to see some details in the
log as well.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 26 May 2023 15:37:15 +0200 |
parents | 5490:91564b57e595 |
children | 5492:b6af4d1ff8c1 |
files | mod_http_debug/mod_http_debug.lua |
diffstat | 1 files changed, 1 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_http_debug/mod_http_debug.lua Fri May 26 15:36:04 2023 +0200 +++ b/mod_http_debug/mod_http_debug.lua Fri May 26 15:37:15 2023 +0200 @@ -3,6 +3,7 @@ module:depends("http") local function handle_request(event) local request = event.request; + (request.log or module._log)("debug", "%s -- %s %q HTTP/%s -- %q -- %s", request.ip, request.method, request.url, request.httpversion, request.headers, request.body); return { status_code = 200; headers = { content_type = "application/json" };