1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:30:56 +00:00

add server host:port info when starting app

This commit is contained in:
Pengfei Xue 2013-11-26 15:30:59 +08:00
parent b16ef12ac0
commit e823b6ea95

5
app.go
View File

@ -28,10 +28,14 @@ func (app *App) Run() {
if HttpPort != 0 {
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
}
BeeLogger.Info("Runing on %s", addr)
var (
err error
l net.Listener
)
if UseFcgi {
if HttpPort == 0 {
l, err = net.Listen("unix", addr)
@ -72,6 +76,7 @@ func (app *App) Run() {
}
}
}
if err != nil {
BeeLogger.Critical("ListenAndServe: ", err)
time.Sleep(100 * time.Microsecond)