Commit Graph

16 Commits

Author SHA1 Message Date
Ulysses Souza 47d170b06a Fix race condition on watch_events
Avoid to attach to restarting containers and ignore
race conditions when trying to attach to already
dead containers

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-09-04 17:55:05 +02:00
Ulysses Souza c8a621b637 Fix Flake8 lint
This removes extra indentation and replace the use of `is` by `==` when
comparing strings

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-02-05 11:11:52 +01:00
kbroadwater 6c3641fdb7 Returing 1 when a container exits with a non-zero exit code with --abort-on-container-exit is set. Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
Catching the first container to exit Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>

Addressing feedback and fixing tests Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>

Adding break and removing extra fixture files Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>

Moving break Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
2017-03-01 17:08:26 -08:00
Joffrey F 3fcd648ba2 Catch APIError while printing container logs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-13 12:10:41 -07:00
Daniel Nephin e8a93821d4 Fix race condition where a container stopping and starting again would cause logs to miss logs.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:11 -04:00
Daniel Nephin 48ed68eeaa Fix geneartors for python3.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 44c1747127 Add tests for reactive log printing.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Daniel Nephin 65797558f8 Refactor log printing to support containers that are started later.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-03-15 13:17:10 -04:00
Stéphane Seguin 038da4eea3 Logs args of LogPrinter as a dictionary
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-03-01 20:24:15 +01:00
Stéphane Seguin 9b36dc5c54 Add --tail flag as option on logs.
Closes #265
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-03-01 20:23:46 +01:00
Stéphane Seguin 82632098a3 Add -f, --follow flag as option on logs.
Closes #2187
Signed-off-by: Stéphane Seguin <stephseguin93@gmail.com>
2016-03-01 20:23:43 +01:00
Daniel Nephin d32bb8efee Fix #1549 - flush after each line of logs.
Includes some refactoring of log_printer_test to support checking for flush(), and so that each test calls the unit-under-test directly, instead of through a helper function.

Signed-off-by: Daniel Nephin <dnephin@docker.com>
2015-11-05 15:33:42 -05:00
Mazz Mosley bee063c07d Fix tests
Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
2015-10-27 17:12:18 +00:00
Daniel Nephin 413b76e228 Fix warning message when a container uses a non-json log driver
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-09-11 12:54:27 -04:00
Daniel Nephin 9d9550c5b6 Fix log printing for python3 by converting everything to unicode.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-26 11:24:48 -04:00
Daniel Nephin 2b589606da Move log_printer_test into correct testing module for naming convention.
Signed-off-by: Daniel Nephin <dnephin@gmail.com>
2015-08-25 16:49:49 -04:00