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

feat: add colored attributes #89

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

joris-bright
Copy link

Closes #61

Adds support for coloring attributes (incuding level, time, msg, source)

@lmittmann
Copy link
Owner

Thank you for the effort! I like the idea of ColorAttr and its flexibility to be used for special attributes, like level, as well as "normal" attributes. Also the fact that it can respect the NoColor option is great.

There are a few question that remain: Can this be achieved with less allocs (the amount of allocations doubles with this implementation)? Is there a more flexible way to handle colors (maybe also support 256bit colors)?

The idea is great! I think it might need a bit of iteration implementation wise.

@joris-bright
Copy link
Author

@lmittmann I'll have a look if I can improve it 👍

@joris-bright
Copy link
Author

Number of allocations should be better now. I've also updated the implementation of Color.

@lmittmann
Copy link
Owner

This will be added in some form, I just have currently no time to work on it. Sorry for the delay.

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.

Custom log level names with color
2 participants