1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00

moved log message to start server

Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
Vishal Rana 2016-11-04 20:58:30 -07:00
parent 409c5a42b7
commit 00ae708f49

View File

@ -505,7 +505,6 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// Start starts the HTTP server.
func (e *Echo) Start(address string) error {
e.Color.Printf(" ⇛ http server started on %s\n", color.Green(address))
return e.StartServer(&http.Server{Addr: address})
}
@ -520,7 +519,6 @@ func (e *Echo) StartTLS(address string, certFile, keyFile string) (err error) {
if err != nil {
return
}
e.Color.Printf(" ⇛ https server started on %s\n", color.Green(address))
return e.startTLS(address, config)
}
@ -533,7 +531,6 @@ func (e *Echo) StartAutoTLS(hosts []string, cacheFile string) (err error) {
if err = e.tlsManager.CacheFile(cacheFile); err != nil {
return
}
e.Color.Printf(" ⇛ https auto https server started on %s\n", color.Green(address))
return e.startTLS(address, config)
}
@ -557,8 +554,10 @@ func (e *Echo) StartServer(s *http.Server) error {
}
if s.TLSConfig == nil {
e.server = gs
e.Color.Printf(" ⇛ http server started on %s\n", color.Green(s.Addr))
} else {
e.tlsServer = gs
e.Color.Printf(" ⇛ https server started on %s\n", color.Green(s.Addr))
}
return gs.ListenAndServe()
}