Skip to content

Commit

Permalink
Flush log message to file before exit
Browse files Browse the repository at this point in the history
Fixes: #2435
  • Loading branch information
Chen Li authored and dlorenc committed Jan 22, 2018
1 parent c792b18 commit d11b74c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/minikube/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package main
import (
"os"

"github.com/golang/glog"
"github.com/pkg/profile"
"k8s.io/minikube/cmd/minikube/cmd"
"k8s.io/minikube/pkg/minikube/constants"
Expand All @@ -29,6 +30,8 @@ import (
const minikubeEnvPrefix = "MINIKUBE_ENABLE_PROFILING"

func main() {
defer glog.Flush()

if os.Getenv(minikubeEnvPrefix) == "1" {
defer profile.Start(profile.TraceProfile).Stop()
}
Expand Down

0 comments on commit d11b74c

Please sign in to comment.