소스 검색

fix: logger

CaIon 4 달 전
부모
커밋
a9a8676f7c
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      logger/logger.go

+ 3 - 1
logger/logger.go

@@ -67,8 +67,10 @@ func LogError(ctx context.Context, msg string) {
 }
 
 func LogDebug(ctx context.Context, msg string, args ...any) {
-	msg = fmt.Sprintf(msg, args...)
 	if common.DebugEnabled {
+		if len(args) > 0 {
+			msg = fmt.Sprintf(msg, args...)
+		}
 		logHelper(ctx, loggerDebug, msg)
 	}
 }