Skip to content

Adding togglable ANSI colored logs#32

Open
Vicepredator wants to merge 2 commits into
thijse:masterfrom
Vicepredator:master
Open

Adding togglable ANSI colored logs#32
Vicepredator wants to merge 2 commits into
thijse:masterfrom
Vicepredator:master

Conversation

@Vicepredator

Copy link
Copy Markdown

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

@bartoszkwiat bartoszkwiat left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nice !

@Vicepredator

Copy link
Copy Markdown
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
Copy Markdown

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

@joscha

joscha commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

@thijse should we sunset this repo in favor of the maintained fork from @vzahradnik ? Or add @vzahradnik as a contributor here and recombine them?

@vzahradnik

Copy link
Copy Markdown

Thanks for mentioning me.

I created the fork because I needed a working library with the features that were piling up here in pull requests. I have no problem abandoning my work if this repository gets revived.

I always prefer a maintained library upstream than forks downstream.

@joscha

joscha commented Dec 23, 2025

Copy link
Copy Markdown
Collaborator

I feel like we should get you in here, merge all.PRs, do a release and publish it to platformIO as well..would you be happy to take that on?

@vzahradnik

Copy link
Copy Markdown

Sure. Just let me know how would you like to proceed. In my fork I not only included all outstanding PRs that felt ready but I also did a slight refactoring and set up CI/CD. Commit history is our trail.

@joscha

joscha commented Dec 29, 2025

Copy link
Copy Markdown
Collaborator

@thijse, this is your repo - thoughts?

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.

4 participants