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

Make silent flag also hide "is up to date" logs #546

Closed
ProfessorManhattan opened this issue Aug 8, 2021 · 8 comments · Fixed by #1107
Closed

Make silent flag also hide "is up to date" logs #546

ProfessorManhattan opened this issue Aug 8, 2021 · 8 comments · Fixed by #1107
Labels
area: ui Changes related to the UI of Task.

Comments

@ProfessorManhattan
Copy link

For every task, I list the dependencies like this:

my-task:
  deps:
    - :npm:prettier
    - :software:jq
    - :software:yq

With the new run: once option it is working absolutely fantastic (thank you Task developers). However, since I include the deps on each task, I get a lot of spam from "is up to date" and the information is not that useful. Is there a way of silencing the tasks without silencing any of the other logs?

@ProfessorManhattan ProfessorManhattan added the type: feature A new feature or functionality. label Aug 8, 2021
@ghostsquad ghostsquad added the v4 label Apr 29, 2022
@ghostsquad
Copy link
Contributor

ghostsquad commented Apr 29, 2022

this could be a UI feature of V4. Making the UI less static/append-only could really improve things.

Though, @ProfessorManhattan are you interested in seeing/parsing the result? or just the spam of watching things run? Because I was also thinking of a "reporting" framework, so you could get the output of a task run in a machine readable format, like JSON.

image

@ssbarnea
Copy link
Contributor

ssbarnea commented Jun 9, 2022

To be honest I am not sure if we need a option to hide it. Instead we can only display it when verbosity level is increased via -v. For normal execution, I do not see much value in it, so if we ensure we display it only when we have extra verbosity, we sort the problem.

@ghostsquad ghostsquad added the area: ui Changes related to the UI of Task. label Jun 16, 2022
@pd93 pd93 removed the v4 label Oct 15, 2022
@danquah
Copy link
Contributor

danquah commented Apr 4, 2023

Would it make sense to use the existing silent mode flag?

I ran in to this when I needed a task to only output the value i explicitly echo'ed as I needed another process to use the output. And setting silent: true worked great - except for any tasks that used a status.

So, for my need it would be perfect if silent: true also silenced status checks.

@andreynering
Copy link
Member

@danquah I think that's a good idea, indeed. I would be happy to accept a PR for that.

@andreynering andreynering changed the title Add Option to Hide "is up to date" Make silent flag also hide "is up to date" logs Apr 4, 2023
@ghostsquad
Copy link
Contributor

A better option would be use of stderr for operator only messaging, and stdout for machine messaging

@danquah
Copy link
Contributor

danquah commented Apr 5, 2023

@ghostsquad as far as I can tell we already log to stderr in this case. I guess I could have solved my particular issue by just directing stderr away. I do really like to have the option of turning the verbosity down via the silent flag - and now that it's already there, it feels like something the Status feature should respect.

@ghostsquad
Copy link
Contributor

@ghostsquad as far as I can tell we already log to stderr in this case. I guess I could have solved my particular issue by just directing stderr away. I do really like to have the option of turning the verbosity down via the silent flag - and now that it's already there, it feels like something the Status feature should respect.

I agree, options are usually beneficial. Though they can also produce a lot of sprawl in the code base.

@danquah
Copy link
Contributor

danquah commented Apr 5, 2023

Though they can also produce a lot of sprawl in the code base.

100%

In this case it my main gripe is that the use of silent is inconsistent. If I set it via --silent or at the taskfile level the message is silenced - but if I specify it on a task level, nothing happens.

@pd93 pd93 removed the type: feature A new feature or functionality. label Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: ui Changes related to the UI of Task.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants