dotCMS / dotCMS/core

Tomcat/catalina (JULI) logs do not reach container stdout — only dotCMS app logs are visible in container logs

Open
#36,075 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

stale Team : Maintenance
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

  1. Run the dotCMS Docker image in a container.
  2. Tail the container logs (docker logs <container>).
  3. Observe that dotCMS application logs appear, but Tomcat-internal org.apache.catalina.* / org.apache.coyote.* (catalina) lines do not.
  4. Exec into the container and observe a separate logs/catalina.<date>.log file 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>.log file 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.