mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-04-28 06:19:20 +08:00
fix:Only print panic function frame && feat: log.ZPanic (#2947)
* fix: log print panic * Merge: main
This commit is contained in:
@@ -17,7 +17,6 @@ package rpccache
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"github.com/openimsdk/tools/mw"
|
||||
|
||||
"github.com/openimsdk/tools/log"
|
||||
"github.com/redis/go-redis/v9"
|
||||
@@ -26,7 +25,7 @@ import (
|
||||
func subscriberRedisDeleteCache(ctx context.Context, client redis.UniversalClient, channel string, del func(ctx context.Context, key ...string)) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
mw.PanicStackToLog(ctx, r)
|
||||
log.ZPanic(ctx, "subscriberRedisDeleteCache Panic", r)
|
||||
}
|
||||
}()
|
||||
for message := range client.Subscribe(ctx, channel).Channel() {
|
||||
|
||||
Reference in New Issue
Block a user