feat: add PROSODY_DEBUG env var for debug logging

Set PROSODY_DEBUG=true to switch the prosody.log level from info to
debug. This makes stanza-too-large rejections and XML parse errors
visible — both are logged at debug level and otherwise invisible.

Usage in k8s:
  env:
  - name: PROSODY_DEBUG
    value: "true"

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
This commit is contained in:
2026-07-15 17:58:02 +02:00
parent d51c68c0b4
commit 33d17d53cc
2 changed files with 11 additions and 1 deletions
+2 -1
View File
@@ -109,9 +109,10 @@ admin_socket = "/var/log/prosody/prosody.sock"
--------------------------------------------------------------------------------
-- The supported levels are: "debug", "info", "warn", "error".
-- Set PROSODY_DEBUG=true in the environment to enable debug logging.
log = {
-- levels = { "info", "warn", "error" }, to = "console" ;
info = "/var/log/prosody/prosody.log";
${PROSODY_LOG_LEVEL} = "/var/log/prosody/prosody.log";
error = "/var/log/prosody/prosody.err";
}
+9
View File
@@ -69,6 +69,15 @@ if [ -z "$S2S_STANZA_SIZE_LIMIT" ]; then
fi
export S2S_STANZA_SIZE_LIMIT
# Logging level for prosody.log. Set PROSODY_DEBUG=true to enable debug
# logging (shows stanza-too-large rejections, XML parse errors, etc.).
if [ "$PROSODY_DEBUG" = "true" ]; then
PROSODY_LOG_LEVEL="debug"
else
PROSODY_LOG_LEVEL="info"
fi
export PROSODY_LOG_LEVEL
chmod 444 /etc/prosody/certs/prosody-ssl.pem
chmod 444 /etc/prosody/certs/prosody-ssl.key