Skip to content

Commit

Permalink
Change the levels of some logs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Fouché committed Jun 29, 2017
1 parent 1750fb9 commit ad50e3e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func newKubeClient(apiserver string, kubeconfig string) (kubeClient kubernetes.I
if len(config.BearerToken) > 0 {
tokenPresent = true
}
glog.Infof("service account token present: %v", tokenPresent)
glog.Infof("service host: %s", config.Host)
glog.V(2).Infof("service account token present: %v", tokenPresent)
glog.V(2).Infof("service host: %s", config.Host)
if kubeClient, err = kubernetes.NewForConfig(config); err != nil {
return nil, err
}
Expand Down
5 changes: 4 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ func main() {
case sig := <-sigs:
glog.Infof("Recieved signal: %v", sig)
if opts.lock {
// Release the lock before termination
glog.Infof("Attempting to release lock")
if err := lock.Unlock(); err != nil {
glog.Errorf("Lock release failed : %s", err)
os.Exit(1)
}
glog.Infof("Lock released")
// Cleanup the lock if no longer in use
glog.Infof("Cleaning lock entry")
if err := lock.Destroy(); err != nil {
if err != consulapi.ErrLockInUse {
Expand All @@ -198,8 +200,9 @@ func main() {
} else {
glog.Infof("Cleanup aborted, lock in use")
}
} else {
glog.Infof("Cleanup succeeded")
}
glog.Infof("Cleanup succeeded")
glog.Infof("Exiting")
}
os.Exit(0)
Expand Down

0 comments on commit ad50e3e

Please sign in to comment.