Home > Software design >  Tomcat's Catalina Logs from ECS Fargate to Cloudwatch
Tomcat's Catalina Logs from ECS Fargate to Cloudwatch

Time:08-30

I am deploying spring boot application in Tomcat container which runs on ECS Fargate.

Docker Image I am using is "tomcat:9.0.65-jdk11" types. So Log file will be catalina-{date1}.log

I need to setup a logging in Cloudwatch. Currently the log driver can send only IO logs to Cloudwatch. But I need to send catalina-{date1}.log, catalina-[date2].log... to Cloudwatch.

I have also tried with AWS Firelens and Fluent Bit

CodePudding user response:

You need to configure Tomcat to send those logs to STDOUT/STDERR instead of, or in addition to, the log files. ECS will automatically send the output of the primary process's STDOUT/STDERR to CloudWatch Logs.

Basically you should configure the Tomcat container such that when you run the container locally, the logs you want to see show up in the docker console output.

  • Related