Skip to content

Commit

Permalink
Merge pull request #194 from withchao/main
Browse files Browse the repository at this point in the history
fix: modify the panic level
  • Loading branch information
withchao authored Jan 13, 2025
2 parents 64fa590 + f040d20 commit 38dd064
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions log/zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ package log
import (
"context"
"fmt"
"github.com/openimsdk/tools/errs"
"os"
"path/filepath"
"time"

"github.com/openimsdk/tools/errs"

rotatelogs "github.com/openimsdk/tools/log/file-rotatelogs"
"github.com/openimsdk/tools/utils/stringutil"

Expand Down Expand Up @@ -138,7 +139,7 @@ func ZError(ctx context.Context, msg string, err error, keysAndValues ...any) {
}

func ZPanic(ctx context.Context, msg string, err error, keysAndValues ...any) {
pkgLogger.Panic(ctx, msg, err, keysAndValues...)
pkgLogger.Error(ctx, msg, err, keysAndValues...)
}

func ZAdaptive(ctx context.Context, msg string, err error, keysAndValues ...any) {
Expand Down Expand Up @@ -470,7 +471,6 @@ func (l *ZapLogger) kvAppend(ctx context.Context, keysAndValues []any) []any {
if l.isSimplify {
if len(keysAndValues)%2 == 0 {
for i := 1; i < len(keysAndValues); i += 2 {

if val, ok := keysAndValues[i].(LogFormatter); ok && val != nil {
keysAndValues[i] = val.Format()
}
Expand Down

0 comments on commit 38dd064

Please sign in to comment.