简体   繁体   中英

how ECS awslogs works

I'm curious how it works using awslogs driver. At Enabling the awslogs Log Driver for Your Containers section, it only mentioned setup logConfiguration using logDriver: awslogs. It indeed works out of box, but when you check the Docker Daemon on the box Docker is not using awslogs driver. So, how it works?

$ docker info | grep "Logging"
Logging Driver: json-file

One possibility is that it is being passed as an argument to the run command for each instance of the container . I have the opposite issue -- and am finding it difficult to override a request to build a container from docker-machine that is passing in json-file as the log driver.

To verify this, you can use docker inspect on a given container. It will have a field for log driver that will indicate what log driver it was started with. The docker info command you are using just tells you the default for the docker service.

However, if you do the docker inspect and it also says json-file , then there's probably something pulling the logs off the disk and into cloudwatch.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM