Skip to content

Commit 644a6ff

Browse files
committed
Merge branch 'main' of github.com:aisa-it/aiplan into dev
2 parents fd71cd9 + 5c45cd2 commit 644a6ff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

aiplan.go/internal/aiplan/dao/aiplan.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -463,15 +463,15 @@ func EntityActivityAfterFind[A Activity](activity *A, tx *gorm.DB) error {
463463
if formatted, err := utils.FormatDateStr(v.NewValue, "2006-01-02T15:04:05Z07:00", nil); err == nil {
464464
v.NewValue = formatted
465465
} else {
466-
slog.Error("format error", err)
466+
slog.Error("data format", "error", err, "value", v.NewValue)
467467
}
468468
}
469469

470470
if v.OldValue != nil && *v.OldValue != "" {
471471
if formatted, err := utils.FormatDateStr(*v.OldValue, "2006-01-02T15:04:05Z07:00", nil); err == nil {
472472
v.OldValue = &formatted
473473
} else {
474-
slog.Error("format error", err)
474+
slog.Error("data format", "error", err, "value", v.NewValue)
475475
}
476476
}
477477
//date, err := utils.FormatDateStr(v.NewValue, "2006-01-02T15:04:05Z07:00", nil)
@@ -547,7 +547,7 @@ func EntityActivityAfterFind[A Activity](activity *A, tx *gorm.DB) error {
547547
} else if err != gorm.ErrRecordNotFound {
548548
continue
549549
} else {
550-
slog.Info(fmt.Sprintf("ERR EntityActivityAfterFind: field: \"%s\", fieldTag: \"%s\", fieldType: \"%T\", id: \"%s\", activityId: \"%s\" error: \"%s\"", fieldName, fieldTag, ptr.Interface(), newID, aI.GetId(), err.Error()))
550+
slog.Debug("ERR EntityActivityAfterFind", "field", fieldName, "fieldTag", fieldTag, "fieldType", fmt.Sprintf("%T", ptr.Interface()), "id", newID, "activityId", aI.GetId(), "error", err.Error())
551551
continue
552552
}
553553
}
@@ -564,7 +564,7 @@ func EntityActivityAfterFind[A Activity](activity *A, tx *gorm.DB) error {
564564
} else if err != gorm.ErrRecordNotFound {
565565
continue
566566
} else {
567-
slog.Info(fmt.Sprintf("ERR EntityActivityAfterFind: field: \"%s\", fieldTag: \"%s\", fieldType: \"%T\", id: \"%s\", activityId: \"%s\" error: \"%s\"", fieldName, fieldTag, ptr.Interface(), oldID, aI.GetId(), err.Error()))
567+
slog.Debug("ERR EntityActivityAfterFind", "field", fieldName, "fieldTag", fieldTag, "fieldType", fmt.Sprintf("%T", ptr.Interface()), "id", oldID, "activityId", aI.GetId(), "error", err.Error())
568568
continue
569569
}
570570
}

0 commit comments

Comments
 (0)