When use logging driver awslogs
, if I don’t define awslogs-stream
, the log for each container will be automatically exported to log group docker
with log stream Docker ID
(A hash key for that container)
logging:
driver: awslogs
options:
awslogs-group: docker
awslogs-region: us-east-2
The document gives the same statement
awslogs-stream
To configure which log stream should be used, you can specify the awslogs-stream log option. If not specified, the container ID is used as the log stream.
Note: Log streams within a given log group should only be used by one container at a time. Using the same log stream for multiple containers concurrently can cause reduced logging performance.
What I try to do is, I’d like to add postfix after this Docker ID, such as ${docker_id}-${team}-${project}-${environment}
what can I do?
Update 1
Maybe I got the answer by myself,
Amazon CloudWatch Logs logging driver - tag
Update 2
Not sure if Rancher support log tag or not.