mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
set gin log
This commit is contained in:
parent
0f760dc388
commit
f87038622b
@ -1 +1 @@
|
||||
Subproject commit 650b201aa792c30261ddc94be07b809e67238b78
|
||||
Subproject commit e2b32de2f93ff46662104833c8de5d5b44a2f25d
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user