Attach to a container's log_stream before they're started

So we're not displaying output of all previous logs for a container, we attach,
if possible, to a container before the container is started.

LogPrinter checks if a container has a log_stream already attached and
print from that rather than always attempting to attach one itself.

Signed-off-by: Mazz Mosley <mazz@houseofmnowster.com>
This commit is contained in:
Mazz Mosley 2015-10-21 17:28:16 +01:00
commit 7603ebea9b
6 changed files with 66 additions and 27 deletions

View file

@ -290,7 +290,8 @@ class Project(object):
start_deps=True,
strategy=ConvergenceStrategy.changed,
do_build=True,
timeout=DEFAULT_TIMEOUT):
timeout=DEFAULT_TIMEOUT,
detached=False):
services = self.get_services(service_names, include_deps=start_deps)
@ -308,7 +309,8 @@ class Project(object):
for container in service.execute_convergence_plan(
plans[service.name],
do_build=do_build,
timeout=timeout
timeout=timeout,
detached=detached
)
]