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:
@@ -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";
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user