Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: logs output formatting #371

Closed
tiborsimko opened this issue Feb 7, 2020 · 0 comments · Fixed by #377
Closed

cli: logs output formatting #371

tiborsimko opened this issue Feb 7, 2020 · 0 comments · Fixed by #377
Assignees

Comments

@tiborsimko
Copy link
Member

Current behaviour

The logs command return info as follows:

job id: 662aff34-ac8f-4f99-8b6e-f6ed3619d12c
WORKFLOW_UUID: 2369311f-87a2-473c-bcf3-1e4983f6be4b
JOB_NAME: merge
COMPUTE_BACKEND: Kubernetes
BACKEND_JOB_ID: 0b3bb85b-e4a7-45d3-9e2d-a61caaf9c10d
DOCKER_IMG: reanahub/reana-env-root6
CMD: source /usr/local/bin/thisroot.sh
hadd /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/merge/merged.root /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/run_mc_0/mergeallvars/merged.root /var/reana/users/b57e902f-fd11-4681-8a

STATUS: finished
LOGS: job: 
 hadd Target file: /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/merge/merged.root
hadd compression setting for all output: 1
hadd Source file 1: /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/run_mc_0/mergeallvars/merged.root
hadd Source file 2: /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/run_mc_1/mergeallvars/merged.root
hadd Target path: /var/reana/users/b57e902f-fd11-4681-8a94-4318ae05d2ca/workflows/2369311f-87a2-473c-bcf3-1e4983f6be4b/all_bkg_mc/merge/merged.root:/

This is rich and follows #348 but it is not easiest for quick grepping of information, and "job id" is lowercase while JOB NAME in uppercase, etc.

Expected behaviour

It'll be good to harmonise this and invent a structure allowing for easy location of various sections of the file.

We could even think about creating org-mode or markdown-mode styled file for easy folding/unfolding of various sections, but the markup should be sufficiently different from what people might use in their logs so that it would not mix up.

Possible example:

>>> WORKFLOW LOGS
...
>>> JOB LOGS
>>>> JOB uuid1
>>>>> JOB NAME hist_0 
>>>>> WORKFLOW_UUID ...
>>>>> JOB uuid STDOUT
body
>>>>> JOB uuid STDERR
body
>>>> JOB uuid2
...

using leading `>>> ' prefix to quickly localise sections.

Could use ":::" and whatnot instead.

This structure would permit quick grepping and also folding/unfolding of various individual steps
in text editors.

(E.g. BSM log can be huge.)

P.S. Note also the task about outputting only wanted steps #369

@diegodelemos diegodelemos self-assigned this Feb 13, 2020
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 14, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 14, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 14, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 14, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 17, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 17, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 17, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
diegodelemos pushed a commit to diegodelemos/reana-client that referenced this issue Feb 17, 2020
* Modeled after brew and archlinux log styles (closes reanahub#371).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants