Amazon-ecs-agent: Option to select multiple log-configuration

Created on 11 Aug 2016  路  5Comments  路  Source: aws/amazon-ecs-agent

There should be an option to add multiple log configuration in Task Definition. For ex., I should be able to select both 'json-file' and 'awslogs' in my log configuration.

kinquestion

Most helpful comment

docker logs is not supported by the awslogs logging driver today, but that's a reasonable feature request. Today, an easy way to view/follow the logs in CloudWatch Logs is to use the CloudWatch Logs CLI Plugin, which will let you run something like aws logs pull --follow --log-group $LOG_GROUP --log-stream-name $LOG_STREAM_NAME (note that the log stream name is the Docker container ID by default).

All 5 comments

@soumyasmruti This behavior isn't supported by Docker; each container has exactly one logging driver. What problem are you trying to solve by using multiple logging drivers?

The problem is I am sending logs to cloudwatch but I also want to access it via docker logs which supports json-file format. Any idea how is it possible?

docker logs is not supported by the awslogs logging driver today, but that's a reasonable feature request. Today, an easy way to view/follow the logs in CloudWatch Logs is to use the CloudWatch Logs CLI Plugin, which will let you run something like aws logs pull --follow --log-group $LOG_GROUP --log-stream-name $LOG_STREAM_NAME (note that the log stream name is the Docker container ID by default).

@samuelkarp oh that's a useful tip. Perhaps it can be published somewhere more visible!

I'm going to close this since this is not supported by Docker. If this feature gets added to Docker we can look at adding support for it in ECS as well.

Was this page helpful?
0 / 5 - 0 ratings