[enhancement] Add a command to print logs for a workflow/job/chunk/etc
In Cylc, it is possible to execute a workflow as in Autosubmit, but it is also possible to print logs for the workflow.
For example, to start the workflow: cylc play five
. This starts the workflow five
in detached mode (i.e. you can close the terminal and it will continue running - possibly another enhancement for AS?).
If you want to get the logs for the workflow, you simply run: cylc cat-log five
.
Or if I know the task and its cycle point (in the case of Autosubmit, that could be a start date, member, chunk, etc) I can also get the logs for that job only, with cylc cat-log five//13/foo
(task foo
, cycle point 13
).
You can choose different logs (-f o
output, -f e
error, -f a
activity, -f x
trace).
It is also able to retrieve remote logs (when that's enabled in the Cylc workflow), but not sure if that'd be easily achieved in AS, and could be a follow-up enhancement.
Finally, you have different "modes". The one I remember and used a lot was the tail-file mode. Where the command would result in the same as if you had run tail -f $log
: cylc cat-log -f a -m t five
(read it as: Cylc, print the log of the activity file in the tail-file mode, for the workflow "five").
This is a command I really miss in AS after using Cylc.
Cheers Bruno