1
0
mirror of https://github.com/astaxie/beego.git synced 2024-12-19 18:50:51 +00:00

Print complete URL after running

This commit is contained in:
ysqi 2016-06-01 20:18:11 +08:00
parent e9f967102c
commit d9b05e6b3f
2 changed files with 4 additions and 2 deletions

4
app.go
View File

@ -148,7 +148,7 @@ func (app *App) Run() {
BeeLogger.Info("Start https server error, confict with http.Please reset https port")
return
}
logs.Info("https server Running on %s", app.Server.Addr)
logs.Info("https server Running on https://%s", app.Server.Addr)
if err := app.Server.ListenAndServeTLS(BConfig.Listen.HTTPSCertFile, BConfig.Listen.HTTPSKeyFile); err != nil {
logs.Critical("ListenAndServeTLS: ", err)
time.Sleep(100 * time.Microsecond)
@ -159,7 +159,7 @@ func (app *App) Run() {
if BConfig.Listen.EnableHTTP {
go func() {
app.Server.Addr = addr
logs.Info("http server Running on %s", app.Server.Addr)
logs.Info("http server Running on http://%s", app.Server.Addr)
if BConfig.Listen.ListenTCP4 {
ln, err := net.Listen("tcp4", app.Server.Addr)
if err != nil {

View File

@ -782,6 +782,8 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request)
if BConfig.WebConfig.AutoRender {
if err := execController.Render(); err != nil {
logs.Error(err)
exception("503", context)
goto Admin
}
}
}