|
@@ -2,6 +2,8 @@ package main
|
|
|
|
|
|
import (
|
|
import (
|
|
"app.yhyue.com/moapp/jybase/endless"
|
|
"app.yhyue.com/moapp/jybase/endless"
|
|
|
|
+ "jyBXSubscribe/entity"
|
|
|
|
+
|
|
// logrusx "app.yhyue.com/moapp/jylogx/logx"
|
|
// logrusx "app.yhyue.com/moapp/jylogx/logx"
|
|
"fmt"
|
|
"fmt"
|
|
"jyBXSubscribe/api/internal/handler"
|
|
"jyBXSubscribe/api/internal/handler"
|
|
@@ -50,7 +52,8 @@ func main() {
|
|
handler.RegisterHandlers(server, ctx)
|
|
handler.RegisterHandlers(server, ctx)
|
|
//日志记录
|
|
//日志记录
|
|
// logx.SetWriter(logrusx.NewLogrusWriter())
|
|
// logx.SetWriter(logrusx.NewLogrusWriter())
|
|
- IC.LogInit(IC.SubscribeUpdateLog, IC.C.SubscribeUpdateLog, IC.MgoLog)
|
|
|
|
|
|
+ IC.SubscribeUpdateLog = entity.NewSaveLog(IC.C.SubscribeUpdateLog.Name, IC.C.SubscribeUpdateLog.CollName, IC.C.SubscribeUpdateLog.MgoSaveCacheSize, IC.C.SubscribeUpdateLog.SPSize, IC.C.SubscribeUpdateLog.BulkSize, IC.C.SubscribeUpdateLog.TimeAfter, IC.C.SubscribeUpdateLog.Timeout, IC.MgoLog)
|
|
|
|
+ go IC.SubscribeUpdateLog.SaveMgo()
|
|
fmt.Printf("Starting server at %s:%d...\n", IC.C.Host, IC.C.Port)
|
|
fmt.Printf("Starting server at %s:%d...\n", IC.C.Host, IC.C.Port)
|
|
server.Start()
|
|
server.Start()
|
|
|
|
|