Skip to content

Commit

Permalink
Added container logs default
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaAni committed Apr 27, 2021
1 parent ad9aa08 commit bc52a09
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions airflow_kubernetes_job_operator/kube_api/queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def __init__(
follow: bool = False,
timeout: int = None,
container: str = None,
add_container_name_to_log: bool = False,
add_container_name_to_log: bool = None,
):
"""Returns the pod logs for a pod. Can follow the pod logs
in real time.
Expand Down Expand Up @@ -134,7 +134,9 @@ def __init__(
self.since = since
self._last_timestamp = None
self._active_namespace = None
self.add_container_name_to_log = add_container_name_to_log
self.add_container_name_to_log = (
add_container_name_to_log if add_container_name_to_log is not None else container is not None
)

def pre_request(self, client: "KubeApiRestClient"):
super().pre_request(client)
Expand Down

0 comments on commit bc52a09

Please sign in to comment.