-
Notifications
You must be signed in to change notification settings - Fork 130
[WIP][PAN-2030] Add formating and color to logging in CLI #1879
base: master
Are you sure you want to change the base?
Conversation
Thanks @pscott, I like your way to start contributing and welcome to this community. |
We'll need to think carefully about this - currently Pantheon only logs to stdout and then when run in a server environment that is piped to a file. We need to ensure the file doesn't get filled with junk characters making the logs unreadable. I suspect that will require detecting if output is actually going to a console and only using color in that case (possibly along with a CLI option to explicitly enable or disable color). |
This is indeed the goal of https://pegasys1.atlassian.net/browse/PAN-2021 which is linked in https://pegasys1.atlassian.net/browse/PAN-2030 |
PAN-2021 doesn't include the auto-detect requirement and we need to land both at the same time - we can't break logging by filling it full of color codes. We could default to no colours with an option to enable before adding auto detection, but we ended o either auto detect or default to off. @pscott It's great that you've picked this up, sorry that all the details aren't entirely sorted but we'd love to work through them with you. |
f012932
to
b3acc19
Compare
@pscott we are currently discussing changing the linked issue https://pegasys1.atlassian.net/browse/PAN-2021 to include a default to no color. Then this PR may have to include this change to make sure we remain compatible with the way terminal output works today. I'll keep you informed when we confirm the decision. Thanks for being so patient. |
Yes I believe everything should fit in this PR. WIP! |
PR description
Add formatting and color to logging in CLI
Fixed Issue(s)
fixes PAN-2030