From 982069903d986cb38152e1da662148db8441e04c Mon Sep 17 00:00:00 2001 From: Mike Zak Date: Mon, 4 May 2020 09:28:42 +0300 Subject: [PATCH 1/2] Add 'local' to list of logging drivers that support `docker-compose logs` Signed-off-by: Mike Zak --- compose/container.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose/container.py b/compose/container.py index 8a2fb240e..a5695c73c 100644 --- a/compose/container.py +++ b/compose/container.py @@ -193,7 +193,7 @@ class Container(object): @property def has_api_logs(self): log_type = self.log_driver - return not log_type or log_type in ('json-file', 'journald') + return not log_type or log_type in ('json-file', 'journald', 'local') @property def human_readable_health_status(self): From f873aeace3438312a67fda8dcb61cb4dd113f7d6 Mon Sep 17 00:00:00 2001 From: Mike Zak Date: Mon, 4 May 2020 11:07:50 +0300 Subject: [PATCH 2/2] Update comment about log drivers that support log stream Signed-off-by: Mike Zak --- compose/container.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compose/container.py b/compose/container.py index a5695c73c..c49b23c7f 100644 --- a/compose/container.py +++ b/compose/container.py @@ -208,8 +208,8 @@ class Container(object): return status_string def attach_log_stream(self): - """A log stream can only be attached if the container uses a json-file - log driver. + """A log stream can only be attached if the container uses a + json-file, journald or local log driver. """ if self.has_api_logs: self.log_stream = self.attach(stdout=True, stderr=True, stream=True)