过滤空的字段

This commit is contained in:
zhangdeman committed 2023-08-26 12:49:06 +08:00
1 parent 532ea798c3
commit 43ebfc11aa
3 files changed
+8 -74

No files matched your search

+3
View File
@@ -167,6 +167,9 @@ func (g *Gorm) write(dataList []zap.Field, level string) {
}
if nil != g.ctx {
for _, extraField := range g.extraCtxFieldList {
if len(extraField) == 0 {
continue
}
dataList = append(dataList, zap.Any(extraField, g.ctx.Value(extraField)))
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.