How to capture tomcat console logs and access logs from an instrumented tomcat container #9897
Unanswered
MadhusudanN
asked this question in
Q&A
Replies: 1 comment
-
The Java agent only has logging instrumentation for Log4j, Logback and java.util.logging |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Scenario ::
Spring boot based application deployed in external tomcat. The tomcat is instrumented with the open telemetry agent and logs exporter is enabled to publish to elastic backend.
Requirement ::
Get the tomcat console logs and access logs captured from otel instrumentation.
Observation ::

When we hit an endpoint we are able to capture the traces and the correlated logs for those traces. Please refer the below screenshot
From the above image we notice that the first two logs are from the spring web framework which gets logged in the tomcat console log (catalina.2023-11-17.log) and the tomcat-localhost log (localhost.2023-11-17.log) But we notice that the contents of access log (localhost_access_log.2023-11-17) are not getting captured in the above logs.
Can someone please let us know if there is a way to capture the tomcat access logs and also the console logs (Tomcat startup is logged in the console logs. Is there a way we can capture this in as part of the traces ? )
Environment and Configuration details ::
OS :: Windows 11
Tomcat version :: 8.5.84
Java version :: 8
Beta Was this translation helpful? Give feedback.
All reactions