-
Notifications
You must be signed in to change notification settings - Fork 510
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
Sort, reorder and color build summary output #6649
Conversation
Is there a way to make the color optional for accessibility purposes? |
@https://github.com/dmcilvaney Are we ok adding another make option for choosing to keep color on or off? |
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.
Let's update the SetToSliceAll
function's name to make it clear we're allowing duplicates in this case (see: comments near that function).
And let's try to strip the colouring from file logs to keep the easy to read, parse, and search through them. You can try modifying newWriterHook
inside toolkit/tools/internal/logger/writerhook.go
so that it cuts out the colouring when useColors
is false
.
Ideally, let's also try to find and use existing libraries to help with coloring the output.
Minor comments aside from that.
Thank you for cleaning this up!
I think |
Keeping this PR focused on summary (color, sort, reorder) and making a separate PR for changes requested in https://microsoft.visualstudio.com/OS/_workitems/edit/46098944 |
480a790
to
4b28e23
Compare
Add new make option LOG_COLOR with options auto (default), always, never. 'always' colors both terminal output and logs; 'auto' colors only terminal output; 'never' disables color in both.
Merge Checklist
All boxes should be checked before merging the PR (just tick any boxes which don't apply to this PR)
*-static
subpackages, etc.) have had theirRelease
tag incremented../cgmanifest.json
,./toolkit/scripts/toolchain/cgmanifest.json
,.github/workflows/cgmanifest.json
)./SPECS/LICENSES-AND-NOTICES/data/licenses.json
,./SPECS/LICENSES-AND-NOTICES/LICENSES-MAP.md
,./SPECS/LICENSES-AND-NOTICES/LICENSE-EXCEPTIONS.PHOTON
)*.signatures.json
filessudo make go-tidy-all
andsudo make go-test-coverage
passSummary
Sort summary, reorder summary, add option to color output on terminal
Change Log
Does this affect the toolchain?
NO
Associated issues
Test Methodology
Summary( before without sort/color):
![image](https://private-user-images.githubusercontent.com/58672330/282646933-230d4b7d-b96e-470c-af3b-374f1b45f75c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MDQ4MTIsIm5iZiI6MTcyNDUwNDUxMiwicGF0aCI6Ii81ODY3MjMzMC8yODI2NDY5MzMtMjMwZDRiN2QtYjk2ZS00NzBjLWFmM2ItMzc0ZjFiNDVmNzVjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDEzMDE1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTNlNmQ1ODA3ZTUyNmIyMGExNDYxMDBkZWY4NmY5M2MxN2MwZjFlMzFhNjAzYjVhYzFkM2YwNGEwYjM4Y2Q5MDEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.m-sNyR53Lq786A80s96UFbQi3QGBacCETyVUgkBrNmo)
Sorted and colored summary:
![image](https://private-user-images.githubusercontent.com/58672330/282647204-f722b909-7c56-4395-98aa-2e7513551998.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MDQ4MTIsIm5iZiI6MTcyNDUwNDUxMiwicGF0aCI6Ii81ODY3MjMzMC8yODI2NDcyMDQtZjcyMmI5MDktN2M1Ni00Mzk1LTk4YWEtMmU3NTEzNTUxOTk4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDEzMDE1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0NjY1ZjNiMzAxNWE5ZDhiYjgxZDg0MDhiMmMxODkyZTVhMGQxMDZiZGFiYmI1NjE3ZWU3NDkyMWEzN2UxZDAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.gmYJNTcynnpOk0QYFwsrJM6_zySdQemzFer6dALXxAs)
Logs are non-colored when option is not LOG_COLOR=always:
![image](https://private-user-images.githubusercontent.com/58672330/283882511-18c534ed-32ec-43b0-ba25-5fd9be80074f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MDQ4MTIsIm5iZiI6MTcyNDUwNDUxMiwicGF0aCI6Ii81ODY3MjMzMC8yODM4ODI1MTEtMThjNTM0ZWQtMzJlYy00M2IwLWJhMjUtNWZkOWJlODAwNzRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDEzMDE1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTA4ZDg2ZTZlMmZhZGJlZTZjMzNmMGM4NjBkY2JhNWUzNjFlYzAwZWI4OTA3MThlMDcyZTRkODY5NjY1ODRiMGQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.4eBTHMjDdAA2Ag8AE2pCJugVY7oz5PltbHjt2u7Hckc)
On dark background
![image](https://private-user-images.githubusercontent.com/58672330/301741528-85a14654-97c8-46dc-8161-e4343f69de52.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ1MDQ4MTIsIm5iZiI6MTcyNDUwNDUxMiwicGF0aCI6Ii81ODY3MjMzMC8zMDE3NDE1MjgtODVhMTQ2NTQtOTdjOC00NmRjLTgxNjEtZTQzNDNmNjlkZTUyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI0VDEzMDE1MlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc5ZDc3YzdlNGNkNjZhZjA5OWRmNDcwMzM0MGE2NDUzN2M4NWRjMmJkMWMwYWM1OGQ5ODY0OTNlNjJmOWY4MDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.9-jE9Je3nHunEjP5YltVLVt8EquH8i6-wmeOFepkwJs)