fix:Only print panic function frame && feat: log.ZPanic (#2947)

* fix: log print panic

* Merge: main
This commit is contained in:
icey-yu
2024-12-12 11:59:15 +08:00
committed by GitHub
parent 120afdf6ae
commit 92ea52febf
7 changed files with 10 additions and 13 deletions
+1 -2
View File
@@ -18,7 +18,6 @@ import (
"context"
"encoding/json"
"fmt"
"github.com/openimsdk/tools/mw"
"runtime/debug"
"sync"
"sync/atomic"
@@ -378,7 +377,7 @@ func (c *Client) activeHeartbeat(ctx context.Context) {
go func() {
defer func() {
if r := recover(); r != nil {
mw.PanicStackToLog(ctx, r)
log.ZPanic(ctx, "activeHeartbeat Panic", r)
}
}()
log.ZDebug(ctx, "server initiative send heartbeat start.")