2021/04/23 14:55:45 d:/code/go-gin-api/internal/api/repository/db_repo/admin_repo/gen_admin.go:98 SLOW SQL >= 200ms
[4670.267ms] [rows:1] SELECT * FROM admin
WHERE is_deleted = -1 AND id = 1 AND is_used = 1 LIMIT 1
{"level":"info","time":"2021-04-23 14:55:45","caller":"core/core.go:474","msg":"core-interceptor","domain":"go-gin-api[fat]","method":"GET","path":"/api/admin/info","http_code":200,"business_code":0,"success":true,"cost_seconds":4.6732673,"trace_id":"f62139a047da777a36ac","trace_info":{"trace_id":"f62139a047da777a36ac","request":{"ttl":"un-limit","method":"GET","decoded_url":"/api/admin/info","header":{"Accept":["/"],"Accept-Encoding":["gzip, deflate, br"],"Accept-Language":["zh-CN,zh;q=0.9"],"Authorization":["admin 1EmSu+IbUb6om7UN0SikDMEkuFVJLICgRRvP5alT88E="],"Authorization-Date":["2021-04-23 14:55:41"],"Connection":["keep-alive"],"Content-Type":["application/x-www-form-urlencoded; charset=utf-8"],"Cookie":["login_token=1ba4686338ee7354395ad13f7d3466c1; the_logo_bg=default; the_header_bg=default; the_sidebar_bg=default; nav_url=%2Fdashboard; nav_title=%20%E4%BB%AA%E8%A1%A8%E7%9B%98"],"Referer":["http://127.0.0.1:9999/"],"Sec-Ch-Ua":[""Google Chrome";v="89", "Chromium";v="89", ";Not A Brand";v="99""],"Sec-Ch-Ua-Mobile":["?0"],"Sec-Fetch-Dest":["empty"],"Sec-Fetch-Mode":["cors"],"Sec-Fetch-Site":["same-origin"],"Token":["1ba4686338ee7354395ad13f7d3466c1"],"User-Agent":["Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.128 Safari/537.36"],"X-Requested-With":["XMLHttpRequest"]},"body":""},"response":{"header":{"Content-Type":["application/json; charset=utf-8"],"Trace-Id":["f62139a047da777a36ac"],"Vary":["Origin"]},"body":{"username":"admin","nickname":"管理员","mobile":"13888888888"},"http_code":200,"http_code_msg":"OK","cost_seconds":4.6732673},"third_party_requests":null,"debugs":null,"sqls":[{"timestamp":"2021-04-23 14:55:45","stack":"d:/code/go-gin-api/internal/api/repository/db_repo/admin_repo/gen_admin.go:98","sql":"SELECT * FROM admin
WHERE is_deleted = -1 AND id = 1 AND is_used = 1 LIMIT 1","rows_affected":1,"cost_seconds":4.6702672}],"redis":[{"timestamp":"2021-04-23 14:55:41","handle":"get","key":"go-gin-api:admin:1ba4686338ee7354395ad13f7d3466c1","cost_seconds":0},{"timestamp":"2021-04-23 14:55:41","handle":"get","key":"go-gin-api:authorized:admin","cost_seconds":0.001}],"grpc":null,"success":true,"cost_seconds":4.6732673}}
{"level":"error","time":"2021-04-23 14:55:46","caller":"core/core.go:359","msg":"got panic","domain":"go-gin-api[fat]","panic":"runtime error: index out of range [0] with length 0","stack":"goroutine 87 [running]:\nruntime/debug.Stack(0x0, 0x0, 0x0)\n\tF:/Go/install/src/runtime/debug/stack.go:24 +0xac\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.New.func2.1(0xc000342360, 0x15170d0, 0xc000388d08, 0xc00168e690, 0xc001640000, 0xc018b9bb4d38149c, 0x178a9cddd, 0x2b80560)\n\td:/code/go-gin-api/internal/pkg/core/core.go:358 +0x7e\npanic(0x138d100, 0xc0019c84e0)\n\tF:/Go/install/src/runtime/panic.go:971 +0x4e6\ngithub.com/xinliangnote/go-gin-api/internal/web/controller/dashboard_handler.(*handler).View.func1(0x15170d0, 0xc0001541d8)\n\td:/code/go-gin-api/internal/web/controller/dashboard_handler/func_view.go:73 +0x107a\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.wrapHandlers.func1(0xc001640000)\n\td:/code/go-gin-api/internal/pkg/core/core.go:214 +0xcb\ngithub.com/gin-gonic/gin.(*Context).Next(0xc001640000)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 +0x9c\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.New.func3(0xc001640000)\n\td:/code/go-gin-api/internal/pkg/core/core.go:505 +0xec\ngithub.com/gin-gonic/gin.(*Context).Next(0xc001640000)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 +0x9c\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.New.func2(0xc001640000)\n\td:/code/go-gin-api/internal/pkg/core/core.go:487 +0x285\ngithub.com/gin-gonic/gin.(*Context).Next(0xc001640000)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 +0x9c\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.New.func1(0xc001640000)\n\td:/code/go-gin-api/internal/pkg/core/core.go:336 +0x6d\ngithub.com/gin-gonic/gin.(*Context).Next(0xc001640000)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/context.go:161 +0x9c\ngithub.com/gin-gonic/gin.(*Engine).handleHTTPRequest(0xc0003a0140, 0xc001640000)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:409 +0x46e\ngithub.com/gin-gonic/gin.(*Engine).ServeHTTP(0xc0003a0140, 0x1505ea0, 0xc001638a80, 0xc000193800)\n\tF:/Go/GOPATH/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:367 +0xe5\ngithub.com/xinliangnote/go-gin-api/internal/pkg/core.(*mux).ServeHTTP(0xc00008e150, 0x1505ea0, 0xc001638a80, 0xc000193800)\n\td:/code/go-gin-api/internal/pkg/core/core.go:234 +0x5a\nnet/http.serverHandler.ServeHTTP(0xc00024a0e0, 0x1505ea0, 0xc001638a80, 0xc000193800)\n\tF:/Go/install/src/net/http/server.go:2887 +0x22b\nnet/http.(*conn).serve(0xc00034a6e0, 0x1507f10, 0xc0015a8340)\n\tF:/Go/install/src/net/http/server.go:1952 +0x1c25\ncreated by net/http.(*Server).Serve\n\tF:/Go/install/src/net/http/server.go:3013 +0x974\n"}
{"level":"error","time":"2021-04-23 14:55:46","caller":"notify/notify.go:15","msg":"Mail config error","domain":"go-gin-api[fat]"}