mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
Engine: optional environment variable 'Logging' in 'serveapi'
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user