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

Add --no-follow flag to exit when all logs have been shown #204

Merged
merged 2 commits into from
Jan 14, 2023

Conversation

tksm
Copy link
Contributor

@tksm tksm commented Jan 13, 2023

Fixes #15

This PR adds --no-follow flag to exit when all logs have been shown.

The name of the flag could be --follow=false. But it will be used with false in most cases, so I chose --no-follow as the auto-completion can work in one shot.

Comment on lines +77 to +79
filter.visit(pod, func(t *Target, containerStateMatched bool) {
removed <- t
})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Containers without their statuses are never added, so now we get container names from container statuses in the same manner as handling Added/Modified events to simplify the logic.

Copy link
Member

@superbrothers superbrothers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your contribution!😊

@superbrothers superbrothers merged commit a5e581d into stern:master Jan 14, 2023
@tksm tksm deleted the no-follow branch January 14, 2023 12:35
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

Successfully merging this pull request may close these issues.

Feature request: print all available logs and exit
2 participants