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

Include task name in log output #398

Closed
wants to merge 2 commits into from
Closed

Conversation

Porges
Copy link
Contributor

@Porges Porges commented Nov 5, 2020

When running tasks which have dependencies which run concurrently, it is hard to understand what is going on. Including the specific task name in the output would help with this.

task: go test ./... -tags=noexit
task: ./scripts/verify_boilerplate.sh
task: go fmt .
task: golangci-lint run -v

After:

task [generator:test]: go test ./... -tags=noexit
task [header-check]: ./scripts/verify_boilerplate.sh
task [generator:format-code]: go fmt .
task [generator:lint]: golangci-lint run -v

I structured the name to match how output: prefixed works.

@mradhi
Copy link

mradhi commented Jan 28, 2021

I appreciate this PR, but I think there is no need for the "task" prefix anymore the task name is really meaningful in that case, but we may think more about the layout of the displayed output.

What about:

* Executing task <task_1_name> [col] [timestamp]
* Executing task <task_2_name> [col] [timestamp]
etc...

Screenshot from 2021-01-28 20-49-09

For the commands executed for each task, I think we may need to add some flag (maybe -v flag to control verbosity)

@Porges
Copy link
Contributor Author

Porges commented Jan 29, 2021

Would you merge this as a small improvement first, and then rework the whole layout later? I feel like it could take some discussion to settle onto a new output format, so it would be nice to have a small improvement in the mean time 🙂

@marco-m
Copy link
Contributor

marco-m commented Mar 12, 2021

I think this PR is a good idea indeed.
For the output format, I am fine with the format proposed in the PR (my 2 cents).

@andreynering
Copy link
Member

Hi @Porges,

Sorry for the long wait to review your PR. This project has been having more issues and PRs than I can keep up.

Thanks for your patch! I just manually merged it with a tiny change: I moved the [...] to after the colon : so we keep the consistency with the other logs which all start with task:.

The commit: fe917af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants