mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 14:29:19 +08:00
set gin log
This commit is contained in:
+1
-1
Submodule cmd/Open-IM-SDK-Core updated: 650b201aa7...e2b32de2f9
@@ -14,6 +14,8 @@ import (
|
||||
"Open_IM/pkg/common/log"
|
||||
"Open_IM/pkg/utils"
|
||||
"flag"
|
||||
"io"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -21,7 +23,11 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
f, _ := os.Create("../logs/api.log")
|
||||
gin.DefaultWriter = io.MultiWriter(f)
|
||||
|
||||
r := gin.Default()
|
||||
r.Use(utils.CorsHandler())
|
||||
// user routing group, which handles user registration and login services
|
||||
|
||||
Reference in New Issue
Block a user