Skip to content

Commit

Permalink
Merge pull request #7425 from kaspanet/master
Browse files Browse the repository at this point in the history
Add 'local' to list of logging drivers that support `docker-compose logs`
  • Loading branch information
aiordache authored Aug 3, 2020
2 parents a2095a2 + f873aea commit 05a5aae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compose/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def log_driver(self):
@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):
Expand All @@ -204,8 +204,8 @@ def human_readable_health_status(self):
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)
Expand Down

0 comments on commit 05a5aae

Please sign in to comment.