1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-08-10 18:40:53 +00:00

conditional debug log of request header+content / response content

This commit is contained in:
Peter Bieringer 2024-06-11 13:26:21 +02:00
parent 1acfa480fa
commit 02019e73e6
3 changed files with 13 additions and 6 deletions

View file

@ -142,7 +142,8 @@ def read_request_body(configuration: "config.Configuration",
environ: types.WSGIEnviron) -> str:
content = decode_request(configuration, environ,
read_raw_request_body(configuration, environ))
logger.debug("Request content:\n%s", content)
if configuration.get("logging", "request_content_on_debug"):
logger.debug("Request content:\n%s", content)
return content