-
Notifications
You must be signed in to change notification settings - Fork 1.9k
feat: allow to customize logs dir through environment variable #2396
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikaro Thank you for this update Nicolas!
We should update the docs as well given we're introducing a new env var.
Allow to customize log directory through `K9S_LOGS_DIR` environment variable. If not set, fallsback on default tmp directory. Fixes #2394
### Customize logs destination | ||
|
||
You can override the default log file destination either with the `--logFile` argument: | ||
|
||
```shell | ||
k9s --logFile /tmp/k9s.log | ||
less /tmp/k9s.log | ||
``` | ||
|
||
Or through the `K9S_LOGS_DIR` environment variable: | ||
|
||
```shell | ||
K9S_LOGS_DIR=/var/log k9s | ||
less /var/log/k9s.log | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derailed is it good for you? Is it also the right place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikaro Brilliant! Thanks for the updates Nicolas!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikaro Thank you for the updates!
…led#2396) Allow to customize log directory through `K9S_LOGS_DIR` environment variable. If not set, fallsback on default tmp directory. Fixes derailed#2394
…led#2396) Allow to customize log directory through `K9S_LOGS_DIR` environment variable. If not set, fallsback on default tmp directory. Fixes derailed#2394
Allow to customize log directory through
K9S_LOGS_DIR
environment variable.If not set, fallsback on default tmp directory.
Fixes #2394