Skip to content

Commit

Permalink
example-scheduler: verbosely log httpsched notifications
Browse files Browse the repository at this point in the history
  • Loading branch information
James DeFelice authored and jdef committed Jul 19, 2018
1 parent ff10f2b commit 2928a8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/v1/cmd/example-scheduler/app/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ func buildHTTPSched(cfg Config, creds credentials) calls.Caller {
log.Println("compression enabled")
cli.With(httpcli.RequestOptions(httpcli.Header("Accept-Encoding", "gzip")))
}
return httpsched.NewCaller(cli)
return httpsched.NewCaller(cli, httpsched.Listener(func(n httpsched.Notification) {
if cfg.verbose {
log.Printf("scheduler client notification: %+v", n)
}
}))
}

func buildFrameworkInfo(cfg Config) *mesos.FrameworkInfo {
Expand Down

0 comments on commit 2928a8d

Please sign in to comment.