Skip to content

Commit

Permalink
fix: 尝试修复自动注入器工作流问题,重构了注入器调用,修复了fatal日志未输出的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Clov614 committed Jan 23, 2025
1 parent b2da394 commit 12decd5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ toolchain go1.22.5
require (
github.com/Clov614/bilibili v0.1.2
github.com/Clov614/go-ai-sdk v0.4.4
github.com/Clov614/logging v0.1.2
github.com/Clov614/wcf-rpc-sdk v0.2.9
github.com/Clov614/logging v0.1.3
github.com/Clov614/wcf-rpc-sdk v0.2.11
github.com/eatmoreapple/openwechat v1.4.10
github.com/gin-gonic/gin v1.10.0
github.com/go-ego/gse v0.80.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ github.com/Clov614/bilibili v0.1.2 h1:vi1Ykn5+xgrwfpR/xLgdXvoNdulaZitXP9BOgdy0n+
github.com/Clov614/bilibili v0.1.2/go.mod h1:th+qNf6jfSDH03oCM4s347a+i7IpCgZyNRIHY8AAXe8=
github.com/Clov614/go-ai-sdk v0.4.4 h1:ebSmdp3MoF/OcSwACG1tDrvZwGogCAfbR64MVlaLsk8=
github.com/Clov614/go-ai-sdk v0.4.4/go.mod h1:S/GDuJSLlnNU47uEpY2FrN1GdP+A4mDXBQZQ2i6sCzk=
github.com/Clov614/logging v0.1.2 h1:DuzFJ7MXpwYyEASoHYr5lZnUchKow36/u3F0p5dhg5Q=
github.com/Clov614/logging v0.1.2/go.mod h1:Vxr9X5cvKXT17F/iBeBj8w6WSAuBQppsvtoCi0UXxe0=
github.com/Clov614/wcf-rpc-sdk v0.2.9 h1:OduZCcGA2ntGvhkpyw1gW/UfGlEV2ZKDK7OB1TNfbtY=
github.com/Clov614/wcf-rpc-sdk v0.2.9/go.mod h1:NM5+RKzcoeYfNxrB1D9Qfttzq2wzl+VYAY2cdgaXRTI=
github.com/Clov614/logging v0.1.3 h1:Ijj5aRuznEpt7qgW5aQf9jlTdKB0ZY9uOz4fn56Y0RU=
github.com/Clov614/logging v0.1.3/go.mod h1:Vxr9X5cvKXT17F/iBeBj8w6WSAuBQppsvtoCi0UXxe0=
github.com/Clov614/wcf-rpc-sdk v0.2.11 h1:mYPACtphmrMQvIHObJMy21cFNz3/KSufiQMBUDl6WxA=
github.com/Clov614/wcf-rpc-sdk v0.2.11/go.mod h1:qeOQ+Y0G/gSNtgwwO/XW2Q5tGPvRFln+iW3ksEWp5MI=
github.com/Microsoft/go-winio v0.5.2 h1:a9IhgEQBCUEk6QCdml9CiJGhAws+YwffDHEMp1VMrpA=
github.com/Microsoft/go-winio v0.5.2/go.mod h1:WpS1mjBmmwHBEWmogvA2mj8546UReBk4v8QkMxJ6pZY=
github.com/bytedance/sonic v1.11.9 h1:LFHENlIY/SLzDWverzdOvgMztTxcfcF+cqNsz9pK5zg=
Expand Down
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ func main() {
zerolog.SetGlobalLevel(zerolog.InfoLevel)
gin.SetMode(gin.ReleaseMode)
}
// 在初始化完成后输出所有缓冲日志
logging.Logger.Flush(zerolog.GlobalLevel())
logging.Logger.SetActive(false) // 取消缓存,正常日志输出
//// 在初始化完成后输出所有缓冲日志
//logging.Logger.Flush(zerolog.GlobalLevel())
//logging.Logger.SetActive(false) // 取消缓存,正常日志输出

defer func() {
if r := recover(); r != nil {
Expand All @@ -45,12 +45,12 @@ func main() {
}
}()
ctx := context.Background()
cli := wcf.NewClient(30)
cli.Run(*wcfdebugflag, *autoInject, false) // 运行wcf客户端
cli := wcf.NewClient(30, *autoInject, false)
cli.Run(*wcfdebugflag) // 运行wcf客户端

rbot := rikkabot.NewRikkaBot(ctx, cli)
a := adapter.NewAdapter(ctx, cli, rbot)
a.HandleCovert() // 消息转换
a.HandleCovert() // 消息转换e11

// 正向http http上报器
if *httpMode {
Expand Down

0 comments on commit 12decd5

Please sign in to comment.