ソースを参照

Merge pull request #7425 from kaspanet/master

Add 'local' to list of logging drivers that support `docker-compose logs`
Anca Iordache 5 年 前
コミット
05a5aae552
1 ファイル変更3 行追加3 行削除
  1. 3 3
      compose/container.py

+ 3 - 3
compose/container.py

@@ -189,7 +189,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):
@@ -204,8 +204,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)