Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XNAT application logs swallowed? #7

Open
andrewbrock-sahmri opened this issue Jul 1, 2021 · 3 comments
Open

XNAT application logs swallowed? #7

andrewbrock-sahmri opened this issue Jul 1, 2021 · 3 comments

Comments

@andrewbrock-sahmri
Copy link
Contributor

The current packer file has:

"sed -i 's/ch.qos.logback.core.rolling.RollingFileAppender/ch.qos.logback.core.ConsoleAppender/' $${CATALINA_HOME}/webapps/ROOT/WEB-INF/classes/logback.xml",

...which seems to swallow the underlying logs that would otherwise get written as when I run docker logs <CONTAINER> all I can see are the Tomcat logs, not the XNAT ones. Removing this line puts the logs in the logs directory in the XNAT home directory, which I think is a bit nicer (but i'm only running this as a docker image, not in k8s, so there might be something I'm missing here).

Happy to send a PR if you agree.

@vs49688
Copy link
Contributor

vs49688 commented Jul 5, 2021

IIRC, that was meant to run over XNAT's logback.xml, forcing it to dump logs to stdout

@andrewbrock-sahmri
Copy link
Contributor Author

Ok, so to follow the pattern of not logging to file and logging everything to console, we might need to stop tomcat from logging to file and console?

root@xnat:/var/lib/docker/containers/8caa427efac301c45fd76c5b55ead4200ee814de4829558c221022b94f05d086# docker exec musing_torvalds ls -ahl logs/
total 28K
drwxrwxrwx 1 root root 4.0K Jul  5 04:24 .
drwxr-xr-x 1 root root 4.0K May 13 18:42 ..
-rw-r----- 1 root root 5.6K Jul  5 04:25 catalina.2021-07-05.log
-rw-r----- 1 root root    0 Jul  5 04:24 host-manager.2021-07-05.log
-rw-r----- 1 root root  410 Jul  5 04:25 localhost.2021-07-05.log
-rw-r----- 1 root root  380 Jul  5 04:26 localhost_access_log.2021-07-05.txt
-rw-r----- 1 root root    0 Jul  5 04:24 manager.2021-07-05.log

(not a super high priority though I guess)

@vs49688
Copy link
Contributor

vs49688 commented Jul 5, 2021

Yeah. I might just nuke logback.xml entirely and write a custom one. This'd fix also fix handling of plugin log files, killing two stones with one bird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

2 participants