Dear XNAT Discussion Group,
Environment
• XNAT running on Kubernetes (namespace: ais-xnat), plugin: Container Service
• Logs present: containers.log (+ rotated files)
• Problem: I added SLF4J statements in Container Service–related classes (e.g., log.debug("...")), but I cannot see any DEBUG lines in containers.log or other container-service logs. VS Code remote debugging has also not attached successfully yet.
What I have tried
Verified code uses SLF4J (org.slf4j.LoggerFactory) and the package is under org.nrg.containers....
Enabled loggers in $XNAT_HOME/config/logback.xml and restarted Tomcat/XNAT:
• org.nrg.containers at DEBUG
• org.nrg.containers.api at DEBUG
• org.nrg.containers.services at DEBUG
• org.nrg.containers.kubernetes at DEBUG
Confirmed appender routing: the same appender used for containers.log should capture these categories.
Reproduced the workflow (cache-recall / dcm2niix launch), but DEBUG lines did not appear.
Searched with grep -rni DEBUG containers.log* and monitored with tail -f containers.log.
Questions
Are there additional logger categories I should enable for Container Service (or command resolution) to surface DEBUG output? For example, org.nrg.framework, org.nrg.xnatx.plugins, or others used by the plugin?
Is there a recommended, up-to-date sample logback.xml snippet for enabling full Container Service DEBUG in XNAT 1.9.x?
For remote debugging on Kubernetes: is the approach below correct?
• Set JAVA_TOOL_OPTIONS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005" on the xnat-web container
• Expose containerPort 5005 and kubectl port-forward svc/xnat-web-debug 5005:5005
• Attach VS Code on localhost:5005 with sources matching the deployed JAR
Does the Container Service plugin route some logs through a different category or level (e.g., INFO only) during orchestration steps, which could explain why log.debug lines do not appear?
If there is a known interaction with shaded logging bindings in the plugin JAR, what is the recommended fix?
If helpful, I can share:
• A minimal code snippet with the log.debug call and its package/class name
• My current logback.xml relevant sections (logger + appender)
• The exact Container Service version and XNAT version
Many thanks for any guidance or a canonical logging/debug configuration.
Kind regards,
Chenxi (Richard) Guo