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

Add colors param to SimplePrinter #13

Closed
galki opened this issue Sep 18, 2019 · 3 comments · Fixed by #32
Closed

Add colors param to SimplePrinter #13

galki opened this issue Sep 18, 2019 · 3 comments · Fixed by #32
Labels
enhancement New feature or request

Comments

@galki
Copy link

galki commented Sep 18, 2019

SimplePrinter(colors: true)

Reason: color is easier than having to search for [E] ...

@galki galki changed the title Add color param to SimplePrinter Add colors param to SimplePrinter Sep 18, 2019
@haarts
Copy link
Collaborator

haarts commented Dec 4, 2019

Wouldn't the PrettyPrinter be best suited for this purpose?

@haarts haarts added the enhancement New feature or request label Dec 4, 2019
@galki
Copy link
Author

galki commented Dec 4, 2019

Perhaps. The problem is that I have limited console space and PrettyPrinter eats up a lot of it. It would make work easier to have the option to output single-line logs which would stand out clearly from the rest of the non-logger output... even if it was a single hard-coded color other than gray.

@haarts
Copy link
Collaborator

haarts commented Dec 10, 2019

Yesterday I've done quite a bit of research into colouring console output. The way I'm thinking about it now is that this would be a good feature to have. I want to implement it as follows:

  • detect if a terminal is attached and if that terminal supports ANSI escapes
  • iff so color the output. I'm planning to use the stdlib io for this an phase out our custom coloring code

So it would be an automatic process. I hope I have time for this end of this week/beginning of next week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants