-
-
Notifications
You must be signed in to change notification settings - Fork 25
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
Feature: colorize logs #51
Comments
Well, I think we should just not colorize any logs at all. I guess the green coloring is a bug and we can correct it. There's this wonderful application called |
I think this could be fun to tackle. :) Besides, I see that Stern is written in Go, so maybe we could import Stern as a dependency? I don't see much coloring logic in the Stern source code though of the logs themselves. Their README is also lacking screenshots sadly. @prune998 Do you happen to have a screenshot of Stern coloring the output? Could spark inspiration :) |
Expected Behavior
Would be grand if kubecolor could do some simple colorizing of log lines when doing
kubecolor logs my-pod-123
.Could be a lot of simple colorizing techniques, such as highlighting ERROR, ERR, and ERRO as bold red. Have WARNING, WRN, and WARN as orange/dark yellow, and so on.
As well as colorizing quotations
"text"
or stuff inside square brackets[text]
to make them stand out more.It's not a perfect solution, but it could help find some keywords in logs.
Then if the log line is a JSON or logfmt message, then apply syntax highlighting there as well. Such as in JSON to highlight the key vs value parts.
Also think timestamps should be grayed out, like using "bright black" in basic ANSI terminal coloring terms.
Current Behavior
Logs are just green.
Context
Please provide any relevant information about your setup. This is important in case the issue is not reproducible except for under certain conditions.
The text was updated successfully, but these errors were encountered: