Only allow log streaming if logdriver is json-file or journald

Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
Joffrey F 2016-09-12 16:02:58 -07:00
commit 7dd2e33057
2 changed files with 29 additions and 1 deletions

View file

@ -163,7 +163,7 @@ class Container(object):
@property
def has_api_logs(self):
log_type = self.log_driver
return not log_type or log_type != 'none'
return not log_type or log_type in ('json-file', 'journald')
def attach_log_stream(self):
"""A log stream can only be attached if the container uses a json-file