akki commented on a change in pull request #6552: AIRFLOW-5850: Capture task 
logs in DockerSwarmOperator
URL: https://github.com/apache/airflow/pull/6552#discussion_r347103945
 
 

 ##########
 File path: airflow/contrib/operators/docker_swarm_operator.py
 ##########
 @@ -89,17 +90,22 @@ class DockerSwarmOperator(DockerOperator):
     :param tty: Allocate pseudo-TTY to the container of this service
         This needs to be set see logs of the Docker container / service.
     :type tty: bool
+    :param enable_logging: Show the application's logs in operator's logs.
+        Supported only if the Docker engine is using json-file or journald 
logging drivers.
+        The `tty` parameter should be set to use this with Python applications.
+    :type enable_logging: bool
     """
 
     @apply_defaults
     def __init__(
             self,
             image,
+            enable_logging=True,
             *args,
             **kwargs):
-
         super().__init__(image=image, *args, **kwargs)
 
+        self.enable_logging = enable_logging
         self.service = None
 
     def _run_image(self):
 
 Review comment:
   The test never actually calls the API, so I think it won't catch this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to