mirror of
https://github.com/clearlinux/docker.git
synced 2026-08-21 13:18:00 +00:00
Engine: optional environment variable 'Logging' in 'serveapi'
This commit is contained in:
+3
-1
@@ -86,7 +86,9 @@ func main() {
|
|||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
// Serve api
|
// 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)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -88,7 +88,8 @@ func (srv *Server) ListenAndServe(job *engine.Job) string {
|
|||||||
return "Invalid protocol format."
|
return "Invalid protocol format."
|
||||||
}
|
}
|
||||||
go func() {
|
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 {
|
for i := 0; i < len(protoAddrs); i += 1 {
|
||||||
|
|||||||
Reference in New Issue
Block a user