Merge pull request #7425 from kaspanet/master

Add 'local' to list of logging drivers that support `docker-compose logs`
This commit is contained in:
Anca Iordache 2020-08-03 15:30:17 +02:00 committed by GitHub
commit 05a5aae552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -189,7 +189,7 @@ class Container(object):
@property @property
def has_api_logs(self): def has_api_logs(self):
log_type = self.log_driver 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 @property
def human_readable_health_status(self): def human_readable_health_status(self):
@ -204,8 +204,8 @@ class Container(object):
return status_string return status_string
def attach_log_stream(self): def attach_log_stream(self):
"""A log stream can only be attached if the container uses a json-file """A log stream can only be attached if the container uses a
log driver. json-file, journald or local log driver.
""" """
if self.has_api_logs: if self.has_api_logs:
self.log_stream = self.attach(stdout=True, stderr=True, stream=True) self.log_stream = self.attach(stdout=True, stderr=True, stream=True)