diff --git a/docker/docker.go b/docker/docker.go index 2fc864adf4..e58bd40013 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -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 { diff --git a/server.go b/server.go index 72ad39cdce..c041491ead 100644 --- a/server.go +++ b/server.go @@ -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 {