Merge pull request #1450 from jimenez/glog_enable

Enabling glog for mesos
This commit is contained in:
Victor Vieux 2015-11-30 13:40:06 -08:00
commit b7ca0e7844
1 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@ import (
"crypto/tls" "crypto/tls"
"encoding/json" "encoding/json"
"errors" "errors"
"flag"
"fmt" "fmt"
"io" "io"
"os" "os"
@ -58,6 +59,10 @@ var (
func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, master string, options cluster.DriverOpts, engineOptions *cluster.EngineOpts) (cluster.Cluster, error) { func NewCluster(scheduler *scheduler.Scheduler, TLSConfig *tls.Config, master string, options cluster.DriverOpts, engineOptions *cluster.EngineOpts) (cluster.Cluster, error) {
log.WithFields(log.Fields{"name": "mesos"}).Debug("Initializing cluster") log.WithFields(log.Fields{"name": "mesos"}).Debug("Initializing cluster")
// Enabling mesos-go glog logging
if log.GetLevel() == log.DebugLevel {
flag.Lookup("logtostderr").Value.Set("true")
}
cluster := &Cluster{ cluster := &Cluster{
dockerEnginePort: defaultDockerEnginePort, dockerEnginePort: defaultDockerEnginePort,
master: master, master: master,