Score:0

tomcat service getting logs from catalina.out, localhost.log and system.prints into journalctl

in flag

I have 2 servers with tomcat installed, one was installed by someone else. Something i noticed about the old one is when I run journalctl -u tomcat.. It shows most of the logs including when an application is deployed/started/restarted/stopped, it even show application errors and the system.out.println output of the apps deployed to tomcat.

With the one I installed recently, the only thing I see in journalctl is when the tomcat container stopped and started. I can still see the logs im looking for at the catalina.out files and localhost.log

I checked the .service files of both server and nothing stands out about logging. Nothing on tomcats logging.properties file as well. Am I missing something? how do I get the same behavior on the new server.

I'm not sure which files/settings I should share, so please tell me if I need to share something like the .service files.

Piotr P. Karwasz avatar
by flag
**systemd-journal** can attach itself to Tomcat's `stdout`/`stderr`. It is the most common way to send logs to systemd-journal. Please share the values of `StandardOutput`/`StandardError` in the service files (and the defaults `DefaultStandardOutput`/`DefaultStandardError` in `systemd.conf`) and the configuration of the `ConsoleHandler` in `logging.properties`.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.