You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
help="Filter job logs to include only those steps that match certain filtering criteria. Use --filter name=value pairs. Available filters are compute_backend, docker_img, status and step.",
888
890
)
891
+
@click.option(
892
+
"--follow",
893
+
"follow",
894
+
is_flag=True,
895
+
default=False,
896
+
help="Follow the logs of the of running workflow or job (similar to `tail -f`). "
897
+
"If workflow or job finishes running, the command exits.",
898
+
)
899
+
@click.option(
900
+
"-s",
901
+
"--step",
902
+
"step",
903
+
help="Step name to follow logs for. "
904
+
"If flag is supplied, command follows a specified job logs. "
905
+
"If it is not supplied, command follows workflow logs. "
906
+
"If --follow flag is not supplied, this flag is ignored.",
907
+
)
908
+
@click.option(
909
+
"-i",
910
+
"--interval",
911
+
"interval",
912
+
default=10,
913
+
help="Sleep time in seconds between log polling if log following is enabled. [default=10]",
914
+
)
889
915
@add_pagination_options
890
916
@check_connection
891
917
@click.pass_context
@@ -894,115 +920,63 @@ def workflow_logs(
894
920
workflow,
895
921
access_token,
896
922
json_format,
897
-
steps=None,
923
+
follow,
924
+
interval,
898
925
filters=None,
899
926
page=None,
900
927
size=None,
928
+
step=None,
901
929
): # noqa: D301
902
930
"""Get workflow logs.
903
931
904
-
The ``logs`` command allows to retrieve logs of running workflow. Note that
905
-
only finished steps of the workflow are returned, the logs of the currently
906
-
processed step is not returned until it is finished.
932
+
The ``logs`` command allows to retrieve logs of a running workflow.
933
+
Either retrive logs and print the result or follow the logs of a running workflow/job.
0 commit comments