Search code examples
javadockerspring-bootamazon-ecs

Is Spring Boot Logging to System Out in Docker on AWS a memory leak?


I have a Dockerised Spring Boot app running happily in AWS and have configured the awslogs driver to stream log entries to CloudWatch. My app is configured to log to system out, which I presume awslogs driver is listening to for log entries. However, if my service is long-running are the logs (to system out) effectively a memory leak? If so, am I better logging to rotating files and somehow configuring awslogs to read from those files? (Documentation pointers for the latter case would be much appreciated.)


Solution

  • It shouldn't be a problem of OOM error unless there's a too big string is logged. Here is an answer for similar question.