Details
-
New Feature
-
Status: Resolved
-
Minor
-
Resolution: Implemented
-
None
-
None
Description
I've noticed during my troubleshooting process that it is cumbersome to enable debug logging for guacamole, especially when using docker. Currently to enable debug logging, I start the container and then replace the setting in the default logback.xml file with this command:
sed -i 's/level="info"/level="debug"/' /usr/local/tomcat/webapps/guacamole/WEB-INF/classes/logback.xml
I then restart the container. I know I can also copy logback.xml to GUACAMOLE_HOME but this is easier for the docker use case.
I think it would be better if there was a guacamole.properties setting for the logback level. E.g.:
logback-level: [trace|debug|info|warn|error]
For my Docker use case, I think this is the best solution as I can then use set_optional_property in start.sh to populate this setting.
Alternatively, I would propose that the Docker start.sh script checks for an environment variable (LOGBACK_LEVEL?) and copies and modifies the logback settings directly. E.g.
if [ -n "$LOGBACK_LEVEL" ]; then unzip -o -j /opt/guacamole/guacamole.war WEB-INF/classes/logback.xml -d $GUACAMOLE_HOME sed -i "s/level=\"info\"/level=\"$LOGBACK_LEVEL\"/" $GUACAMOLE_HOME/logback.xml fi
It's less elegant, but it works for my use case.
Thoughts?