mirror of
https://github.com/docker/compose.git
synced 2025-07-12 08:14:26 +02:00
Merge pull request #40 from orchardup/fix-35
Make sure attach() is called as soon as LogPrinter is initialized
This commit is contained in:
commit
48eb5e5c82
@ -31,8 +31,9 @@ class LogPrinter(object):
|
|||||||
|
|
||||||
def _make_log_generator(self, container, color_fn):
|
def _make_log_generator(self, container, color_fn):
|
||||||
prefix = color_fn(container.name + " | ")
|
prefix = color_fn(container.name + " | ")
|
||||||
for line in split_buffer(self._attach(container), '\n'):
|
# Attach to container before log printer starts running
|
||||||
yield prefix + line
|
line_generator = split_buffer(self._attach(container), '\n')
|
||||||
|
return (prefix + line for line in line_generator)
|
||||||
|
|
||||||
def _attach(self, container):
|
def _attach(self, container):
|
||||||
params = {
|
params = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user