From 9b8178149622937e5e06b1d0c8677fdf9d2fb011 Mon Sep 17 00:00:00 2001 From: zhangzengfei <zhangzengfei@smartai.com> Date: 星期三, 28 八月 2024 10:52:56 +0800 Subject: [PATCH] 添加调试日志 --- db/person.go | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/db/person.go b/db/person.go index 7bdd7ca..2dfadeb 100644 --- a/db/person.go +++ b/db/person.go @@ -1,6 +1,7 @@ package db import ( + "basic.com/valib/logger.git" "encoding/base64" "sdkCompare/util" "strconv" @@ -59,6 +60,7 @@ if p.FaceFeature != "" { byteFeat, err := base64.StdEncoding.DecodeString(p.FaceFeature) if err != nil { + logger.Errorf("Person %s feature is invalid", p.Id) continue } @@ -69,6 +71,8 @@ FaceFeature: util.ByteSlice2float32Slice(byteFeat), Enable: int32(p.Enable), }) + } else { + logger.Errorf("Person %s feature is empty %s", p.Id) } } return -- Gitblit v1.8.0