Tomcat/catalina (JULI) logs do not reach container stdout — only dotCMS app logs are visible in container logs
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
dotCMS uses log4j2 and runs in Tomcat. When running in a container, only the dotCMS application logs (emitted via log4j2) reach the container log stream (docker logs / kubectl logs). Tomcat's own internal logging via java.util.logging (JULI) — the "catalina" logs such as org.apache.catalina.* and org.apache.coyote.* (connector init, lifecycle, startup errors) — are written to a separate catalina.<date>.log file and do not reliably surface in the container log stream.
This makes container-only failures (connector/SSL/startup/lifecycle problems) hard to debug, since the operator only sees dotCMS app logs and has no easy access to the Tomcat-internal logs.
Root cause: Tomcat's raw java.util.logging stream is not bridged into log4j2. log4j-appserver's TomcatLogger only intercepts the org.apache.juli.logging.Log facade; any code logging directly via java.util.logging falls through to the JULI AsyncFileHandler (separate catalina.<date>.log) plus a ConsoleHandler that does not surface. The log4j-jul bridge jar is absent from the image.
Impact: Observability / debuggability in containerized deployments. No functional/runtime impact.
Steps to Reproduce
- Run the dotCMS Docker image in a container.
- Tail the container logs (
docker logs <container>). - Observe that dotCMS application logs appear, but Tomcat-internal
org.apache.catalina.*/org.apache.coyote.*(catalina) lines do not. - Exec into the container and observe a separate
logs/catalina.<date>.logfile holding the missing Tomcat-internal logs.
Acceptance Criteria
- Tomcat-internal (catalina/JULI) logs appear on container stdout (
docker logs/kubectl logs). - The same Tomcat-internal logs also appear in
dotcms.log, unified with application logs. - No separate
catalina.<date>.logfile is produced. - Access logs (Tomcat
AccessLogValve) remain a separate file (not routed to console/dotcms.log).
dotCMS Version
Latest from main branch (container/Docker image).
Severity
Medium - Some functionality impacted
Links
NA
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the container/Docker image and the Tomcat JULI, log4j-appserver TomcatLogger, and log4j2 configuration described in the issue; reproduce with docker logs and the catalina..log file. Done means Tomcat-internal logs reach stdout and dotcms.log, no catalina..log is produced, and AccessLogValve access logs remain separate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- devops, observability
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100