Files
gf/.example/net/ghttp/server/log/log_error.go

16 lines
225 B
Go
Raw Normal View History

2019-06-24 19:05:07 +08:00
package main
import (
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/net/ghttp"
2019-06-24 19:05:07 +08:00
)
func main() {
s := ghttp.GetServer()
s.BindHandler("/log/error", func(r *ghttp.Request) {
2019-12-20 23:23:50 +08:00
panic("OMG")
2019-06-24 19:05:07 +08:00
})
s.SetErrorLogEnabled(true)
s.SetPort(8199)
s.Run()
}