mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:40:54 +00:00
beego: improve the log debug for running server
This commit is contained in:
parent
08b3e4191e
commit
f7cd1479ba
1
admin.go
1
admin.go
@ -458,6 +458,7 @@ func (admin *adminApp) Run() {
|
||||
for p, f := range admin.routers {
|
||||
http.Handle(p, f)
|
||||
}
|
||||
BeeLogger.Info("Running on %s", addr)
|
||||
err := http.ListenAndServe(addr, nil)
|
||||
if err != nil {
|
||||
BeeLogger.Critical("Admin ListenAndServe: ", err)
|
||||
|
4
app.go
4
app.go
@ -48,8 +48,6 @@ func (app *App) Run() {
|
||||
addr = fmt.Sprintf("%s:%d", HttpAddr, HttpPort)
|
||||
}
|
||||
|
||||
BeeLogger.Info("Running on %s", addr)
|
||||
|
||||
var (
|
||||
err error
|
||||
l net.Listener
|
||||
@ -78,6 +76,7 @@ func (app *App) Run() {
|
||||
if HttpsPort != 0 {
|
||||
app.Server.Addr = fmt.Sprintf("%s:%d", HttpAddr, HttpsPort)
|
||||
}
|
||||
BeeLogger.Info("Running on %s", app.Server.Addr)
|
||||
err := app.Server.ListenAndServeTLS(HttpCertFile, HttpKeyFile)
|
||||
if err != nil {
|
||||
BeeLogger.Critical("ListenAndServeTLS: ", err)
|
||||
@ -90,6 +89,7 @@ func (app *App) Run() {
|
||||
if EnableHttpListen {
|
||||
go func() {
|
||||
app.Server.Addr = addr
|
||||
BeeLogger.Info("Running on %s", app.Server.Addr)
|
||||
err := app.Server.ListenAndServe()
|
||||
if err != nil {
|
||||
BeeLogger.Critical("ListenAndServe: ", err)
|
||||
|
Loading…
Reference in New Issue
Block a user