Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--watch doesn't work in combinationwith --start #334

Open
kacirekj opened this issue Dec 18, 2020 · 2 comments
Open

--watch doesn't work in combinationwith --start #334

kacirekj opened this issue Dec 18, 2020 · 2 comments

Comments

@kacirekj
Copy link

When I execute:

awslogs get /ecs/log-name --s 10m -w

What I expect:
Return last 10 minutes of logs and then continue show up logs in mode --watch

What I will get instead:
Only last 10 minutes of logs is returned, any new logs aren't appearing.

Am I sure about that?
Yes I'm. It was quadruplechecked.

@rarylson
Copy link

rarylson commented Feb 17, 2023

I observed a bug related to awslogs get [...] ALL --watch today, and then I arrived in this bug report here. I don't know if the cases are related or not (maybe I should create a new bug report?).

In my case, --watch just shows the new logs for the log streams that existed at the time the command started. If new logs are put into newer log streams, they are not "captured" by the --watch command.

To reproduce this, when using --watch to check logs from a Lambda function, just edit the Lambda code (e.g. add a new line) and deploy it again. The new code will force the creation of new Lambda environments, which in turn will create new log streams. We need to CTRL+C + re-run the awslogs get [...] ALL --watch command in order to see the new logs (from the new log streams). While the log streams stay the same, the --watch command works well.

Note: Maybe this is the expected behavior (and just a matter of the docs not being clear). I don't know what exactly the tool means by ALL (all stream at the command you ran the command, or all stream from that point and beyond if you combine it with --watch?)

@rarylson
Copy link

I saw some bug reports regarding --watch together with --start.

And also --watch together with ALL: #214

I'll try to use the most recent version (pip) to check if some improvement was already done (now I'm using the latest version from Homebrew).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants