-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add --file flag to 'minikube logs' to automatically put logs into a file. #11240
Conversation
Hi @andriyDev. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Can one of the admins verify this patch? |
@andriyDev Run |
@spowelljr Done! |
@andriyDev so -file will still output to the console ? I would rather the -file only write to a file and let user's console be clean |
@medyagh No, the console is clean when using --file. Errors however will still output to the console though (e.g. permission denied). This way users can see any issues resulting from the actual logging process and not have that be tied into the log file. |
var err error | ||
|
||
if fileOutput != "" { | ||
logOutput, err = os.Create(fileOutput) |
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.
So are we expecting an absolute or relative path here? Enforcing one or the other will make things less confusing for the user.
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.
It can be either. Isn't it standard to allow both relative and absolute paths for file parameters?
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.
we should allow user both, I image I would wanna do
minikube logs -f ~/Desktop/m.log
or
minikube logs -f /tmp/m.log
/ok-to-test |
kvm2 driver with docker runtime
Times for minikube ingress: 43.2s 36.7s 34.9s 35.4s 42.9s Times for minikube start: 54.1s 53.8s 51.8s 53.2s 52.6s docker driver with docker runtime
Times for minikube ingress: 36.5s 33.5s 33.0s 30.0s 33.0s Times for minikube start: 22.1s 22.0s 22.5s 22.3s 21.9s docker driver with containerd runtime
Times for minikube start: 44.2s 46.8s 44.7s 44.5s 43.5s |
Rebased onto master. |
/retest-this-please |
1 similar comment
/retest-this-please |
Rebased onto master x2. |
Rebased onto master x3. |
kvm2 driver with docker runtime
Times for minikube start: 58.5s 52.2s 52.9s 50.1s 56.2s Times for minikube ingress: 41.8s 36.8s 36.8s 42.3s 36.2s docker driver with docker runtime
Times for minikube ingress: 33.5s 33.5s 33.5s 32.5s 33.0s Times for minikube start: 23.4s 22.3s 23.0s 22.5s 21.7s docker driver with containerd runtime
Times for minikube start: 32.4s 43.1s 43.8s 43.2s 49.3s |
kvm2 driver with docker runtime
Times for minikube start: 52.2s 49.2s 51.1s 45.8s 52.5s Times for minikube (PR 11240) ingress: 34.2s 57.2s 34.2s 34.7s 35.9s docker driver with docker runtime
Times for minikube ingress: 34.0s 29.5s 54.0s 43.5s 31.0s Times for minikube start: 22.1s 21.1s 21.8s 21.9s 22.0s docker driver with containerd runtime
Times for minikube (PR 11240) start: 43.3s 42.3s 43.3s 47.3s 42.7s |
kvm2 driver with docker runtime
Times for minikube start: 47.8s 49.9s 51.1s 46.4s 50.9s Times for minikube ingress: 43.3s 43.8s 43.2s 35.7s 44.7s docker driver with docker runtime
Times for minikube start: 22.6s 21.6s 21.5s 21.0s 21.2s Times for minikube ingress: 37.0s 33.5s 37.0s 33.0s 38.0s docker driver with containerd runtime
Times for minikube start: 44.0s 47.2s 43.9s 47.3s 43.0s |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andriyDev, medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Looks good to me , Thank you for this PR and improving minikube, |
fixes #11231.
Before:
After:
After file: