Skip to content

Include task name in log output#398

Closed
Porges wants to merge 2 commits into
go-task:masterfrom
Porges:master
Closed

Include task name in log output#398
Porges wants to merge 2 commits into
go-task:masterfrom
Porges:master

Conversation

@Porges

@Porges Porges commented Nov 5, 2020

Copy link
Copy Markdown
Contributor

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

mradhi commented Jan 28, 2021

Copy link
Copy Markdown

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

Porges commented Jan 29, 2021

Copy link
Copy Markdown
Contributor Author

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

marco-m commented Mar 12, 2021

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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.

4 participants