-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 Terminal Logger respect verbosity #9810
Conversation
Is is possible to show renderings of some of the test 'verified' files/scenarios? It'd be good to be able to visually verify the changes here. I was able to use this tool to generate these locally, with this script (run from the Snapshots directory): $verifieds = @(get-childitem TerminalLogger_Tests.*.verified.txt)
foreach ($snapshot in $verifieds) {
$name = [System.IO.Path]::GetFileNameWithoutExtension($snapshot)
get-content $snapshot | C:\Users\chusk\go\bin\ansisvg.exe > "$name.svg"
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be nice to short-circuit return from the methods on quiet mode - so that diff would get less cluttered
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Do you want to flip to "ready for review"?
I wonder should we put this change under a change wave? |
IMO no - terminal logger is a live, always updating feature |
I ran the TL with detailed verbosity on multiple repositories to check the behavior. All seems to be fine, except for one very annoying line that shows on detailed and diagnostics verbosity. It is a line produced by "exec" task and it shows the exec command line for the compiler call as High priority message. The message is usually huge. The console logger has a work-around that allows not to show this line when minimal verbosity is used. Maybe not for this PR, but should we consider implementing similar workaround in TL or fixing the priority of this message? |
Yes, we should detect + workaround this. I'm not sure we can change the priority, maybe there is some other flag/signal we can set or detect? Now that we have forward-compatibility this could almost be a specific message type :D |
Well, we have a specific message type If needed, I can add this in this PR though. |
Adding the parameter to terminal logger parameters appeared to be easier (apparently, we already have most of the code in place), so I added it in this PR.
@JanKrivanek, @rokonec could you please review couple of latest commits? |
@AR-May that seems very acceptable to me, thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Added some suggestions for improvements
Fixes #9667, #9654
Context
We would like to make the terminal logger partially respect verbosity.
Changes Made
In case of Quiet verbosity, none of the static part of the Terminal Logger output, which is grouped by the project, is shown. Warnings and errors are shown as they come immediately.
In case of Minimal and Normal verbosity, the behavior stands intact.
In case of Detailed and Diagnostic verbosity, the terminal logger shows all the high priority messages in the static part of the output, under the corresponding project.
Testing
Locally & unit tests