mirror of
https://github.com/labstack/echo.git
synced 2025-07-01 00:55:04 +02:00
moved log message to start server
Signed-off-by: Vishal Rana <vr@labstack.com>
This commit is contained in:
5
echo.go
5
echo.go
@ -505,7 +505,6 @@ func (e *Echo) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
|||||||
|
|
||||||
// Start starts the HTTP server.
|
// Start starts the HTTP server.
|
||||||
func (e *Echo) Start(address string) error {
|
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})
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.Color.Printf(" ⇛ https server started on %s\n", color.Green(address))
|
|
||||||
return e.startTLS(address, config)
|
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 {
|
if err = e.tlsManager.CacheFile(cacheFile); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
e.Color.Printf(" ⇛ https auto https server started on %s\n", color.Green(address))
|
|
||||||
return e.startTLS(address, config)
|
return e.startTLS(address, config)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -557,8 +554,10 @@ func (e *Echo) StartServer(s *http.Server) error {
|
|||||||
}
|
}
|
||||||
if s.TLSConfig == nil {
|
if s.TLSConfig == nil {
|
||||||
e.server = gs
|
e.server = gs
|
||||||
|
e.Color.Printf(" ⇛ http server started on %s\n", color.Green(s.Addr))
|
||||||
} else {
|
} else {
|
||||||
e.tlsServer = gs
|
e.tlsServer = gs
|
||||||
|
e.Color.Printf(" ⇛ https server started on %s\n", color.Green(s.Addr))
|
||||||
}
|
}
|
||||||
return gs.ListenAndServe()
|
return gs.ListenAndServe()
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user