Open thorfi opened 1 year ago
--since
--until
--tail
are all useful features of docker compose logs
, but none are implemented for the ECS context.
For example:
1 error occurred:
* option "logs --tail" on context type ECS.: unsupported flag
The logs are drawn from Cloudwatch. My workaround (for a staging environment) has been to apply a retention policy to the Log Group; but this doesn't really solve the problem.
An alternative would be to query the logs directly from Cloudwatch, but that starts to dilute the benefit of ECS/Compose.
The AWS Go SDK includes FilterLogEvents which, among other things, supports startTime
and endTime
which look like a good fit for the since
and until
CLI parameters.
Description
ECS context logs does not support --since option
Steps to reproduce the issue:
docker context use aws
docker compose --verbose -f docker-compose.yml logs --follow --since 1m
Describe the results you received:
Describe the results you expected:
I expected that the since option would work correctly and provide recent logs, instead of the only option being to dump the entire logs since the creation of the stack (which for long running stacks is a huge problem).
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker-compose --version
:Output of
docker version
:Output of
docker context show
:Output of
docker context inspect context-name
:Output of
docker info
: