mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Engine: optional environment variable 'Logging' in 'serveapi'
This commit is contained in:
parent
4e7cb37dcc
commit
02ddaad5d9
2 changed files with 5 additions and 2 deletions
|
@ -86,7 +86,9 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
// Serve api
|
||||
if err := eng.Job("serveapi", flHosts...).Run(); err != nil {
|
||||
job := eng.Job("serveapi", flHosts...)
|
||||
job.Setenv("Logging", true)
|
||||
if err := job.Run(); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -88,7 +88,8 @@ func (srv *Server) ListenAndServe(job *engine.Job) string {
|
|||
return "Invalid protocol format."
|
||||
}
|
||||
go func() {
|
||||
chErrors <- ListenAndServe(protoAddrParts[0], protoAddrParts[1], srv, true)
|
||||
// FIXME: merge Server.ListenAndServe with ListenAndServe
|
||||
chErrors <- ListenAndServe(protoAddrParts[0], protoAddrParts[1], srv, job.GetenvBool("Logging"))
|
||||
}()
|
||||
}
|
||||
for i := 0; i < len(protoAddrs); i += 1 {
|
||||
|
|
Loading…
Reference in a new issue