Skip to content

feat: Allow customization of logs timestamp color #3386

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

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

Conversation

laurent-so-1
Copy link

Description

This PR add an option timeColor to allow customization of logs timestamp color from a skin.
It will default to gray as previously.

Fixes #2875

make test
?       github.com/derailed/k9s [no test files]
ok      github.com/derailed/k9s/cmd     0.096s
ok      github.com/derailed/k9s/internal        0.021s
ok      github.com/derailed/k9s/internal/client 0.044s
ok      github.com/derailed/k9s/internal/color  0.004s
ok      github.com/derailed/k9s/internal/config 0.101s
ok      github.com/derailed/k9s/internal/config/data    0.039s
ok      github.com/derailed/k9s/internal/config/json    0.408s
?       github.com/derailed/k9s/internal/config/mock    [no test files]
ok      github.com/derailed/k9s/internal/dao    0.118s
ok      github.com/derailed/k9s/internal/health 0.023s
ok      github.com/derailed/k9s/internal/model  2.118s
ok      github.com/derailed/k9s/internal/model1 0.034s
?       github.com/derailed/k9s/internal/perf   [no test files]
ok      github.com/derailed/k9s/internal/port   0.010s
ok      github.com/derailed/k9s/internal/render 0.197s
?       github.com/derailed/k9s/internal/render/helm    [no test files]
?       github.com/derailed/k9s/internal/slogs  [no test files]
ok      github.com/derailed/k9s/internal/tchart 0.006s
ok      github.com/derailed/k9s/internal/ui     0.082s
ok      github.com/derailed/k9s/internal/ui/dialog      0.543s
ok      github.com/derailed/k9s/internal/view   0.068s
ok      github.com/derailed/k9s/internal/view/cmd       0.013s
ok      github.com/derailed/k9s/internal/vul    0.031s
ok      github.com/derailed/k9s/internal/watch  0.012s
ok      github.com/derailed/k9s/internal/xray   0.059s
make cover
        github.com/derailed/k9s         coverage: 0.0% of statements
ok      github.com/derailed/k9s/cmd     0.077s  coverage: 32.2% of statements
ok      github.com/derailed/k9s/internal        0.019s  coverage: 82.5% of statements
ok      github.com/derailed/k9s/internal/client 0.036s  coverage: 31.8% of statements
ok      github.com/derailed/k9s/internal/color  0.006s  coverage: 100.0% of statements
ok      github.com/derailed/k9s/internal/config 0.074s  coverage: 74.0% of statements
ok      github.com/derailed/k9s/internal/config/data    0.031s  coverage: 61.9% of statements
ok      github.com/derailed/k9s/internal/config/json    0.254s  coverage: 47.9% of statements
        github.com/derailed/k9s/internal/config/mock            coverage: 0.0% of statements
ok      github.com/derailed/k9s/internal/dao    0.099s  coverage: 11.0% of statements
ok      github.com/derailed/k9s/internal/health 0.016s  coverage: 57.1% of statements
ok      github.com/derailed/k9s/internal/model  2.113s  coverage: 34.8% of statements
ok      github.com/derailed/k9s/internal/model1 0.034s  coverage: 56.5% of statements
        github.com/derailed/k9s/internal/perf           coverage: 0.0% of statements
ok      github.com/derailed/k9s/internal/port   0.009s  coverage: 69.3% of statements
ok      github.com/derailed/k9s/internal/render 0.088s  coverage: 59.0% of statements
        github.com/derailed/k9s/internal/render/helm            coverage: 0.0% of statements
        github.com/derailed/k9s/internal/slogs          coverage: 0.0% of statements
ok      github.com/derailed/k9s/internal/tchart 0.004s  coverage: 21.2% of statements
ok      github.com/derailed/k9s/internal/ui     0.090s  coverage: 55.5% of statements
ok      github.com/derailed/k9s/internal/ui/dialog      0.547s  coverage: 31.8% of statements
ok      github.com/derailed/k9s/internal/view   0.088s  coverage: 14.8% of statements
ok      github.com/derailed/k9s/internal/view/cmd       0.015s  coverage: 80.0% of statements
ok      github.com/derailed/k9s/internal/vul    0.034s  coverage: 32.2% of statements
ok      github.com/derailed/k9s/internal/watch  0.013s  coverage: 10.6% of statements
ok      github.com/derailed/k9s/internal/xray   0.060s  coverage: 61.2% of statements

@laurent-so-1
Copy link
Author

@derailed Do you think it is something interesting?

If you do, I will try to give the same treatment to all hard-coded colors.

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.

configureable log timestamp colour
1 participant