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
Added --follow-retry/-F for docker logs #7663
Conversation
Docs LGTM - though the api change will need moving to 1.15 :) |
I'll wait until someone bump docs :) |
@LK4D4 I am not sure I like the name |
@tiborvass I get this name from combination of options in |
rebased |
@LK4D4 My bad, it's fine like this, since the reader is blocking anyways. I'm still trying to find a better name than |
|
LGTM |
@3onyc thanks! |
Moved docs to 1.15. @tiborvass If you okay with name now - feel free to merge. |
Do we really need a flag for this specific functionality? Please be conservative when adding flags because they are almost impossible to take a way. We should only do something like this if it is an extreme inconvenience to a user or if it would be impossible for them to implement with tooling. |
@crosbymichael Actualy I don't know, but moving this functionality to just -f will be API breakage. |
see the discussion from #7020 I think the point was to not have -f hang out until the container is removed but some folks still wanted that functionality... |
what is the functionality on |
@jfrazelle attach has the same behavior as |
So maybe as a mirror, we could add "--retry" to attach? (mirroring |
This will be blocked until @shykes approves introducing yet another flag. I personally think this is useful especially with the introduction of restart policies: it makes total sense to me to retrieve the logs of a redis container that has a restart policy of always or on-failure. @crosbymichael @LK4D4 @vieux maybe an alternative solution would be to change |
@tiborvass I'm pretty sure that if we change |
If container stops this commands retry to join it logs until it start again. When container is destroyed this command just exit. Fixes #7643 Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
When you Note: doing this will break users who rely on the specific (IMO incorrect) behavior of ending the stream when the process dies (instead of continuing the stream across any number of processes in the container). For example, maybe you are using |
If container stops this commands retry to join it logs until it start again. When container is destroyed this command just exit.