We have a suite of microservices that are currently hosted on AWS ECS-Fargate. They are implemented using Spring Boot and packaged as a Docker container using an OpenJDK-based image.
Application logging is configured using logging.config
from the Spring runtime core properties and currently points to a bundled classpath resource as follows:
logging:
config: 'classpath:config/logback-spring.xml'
At the ECS task level we configure logs using the awslogs driver which redirects all console output to AWS CloudWatch.
However, this approach is quickly proving unwieldy as it requires us to rebuild and subsequently redeploy the microservices everytime we need to modify the logging configuration.
What is the current best practice for configuring logs using resources external to the application when hosted within the AWS environment?