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

Adding togglable ANSI colored logs #32

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Vicepredator
Copy link

This is a fork of @xHeler 's idea of implementing ANSI colours to distinguish different log types.

I have added the possibility to enable/disable (default disabled) this functionality either from the constructor:

Log.begin(level, &Serial, showLevel, showColors);

or by calling the specific method:

Log.setShowColors(showColors);

I also improved the readability of the code by refactoring the part that deals with printing ANSI codes

Copy link

@xHeler xHeler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice !

@Vicepredator
Copy link
Author

Maybe in the future I will add full customization of the colors...we will see.
By the way, this PR is already a great improvement for those like me who use ANSI serial monitor

@vzahradnik
Copy link

Since this repository seems unmaintained, I decided to grab all pull requests in this repo which seemed polished enough and I added my own changes. I plan to maintain my fork and I'm sharing the link here just in case it would be useful to someone else. The library is already published in the PlatformIO registry.

Check the release page for full details.

Pull requests are welcome :)
image

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

Successfully merging this pull request may close these issues.

3 participants