增加日志配置选项支持,优化日志初始化与数据库日志记录

This commit is contained in:
2026-01-27 10:32:43 +08:00
parent 729d335a69
commit e6e6d3b222
11 changed files with 220 additions and 11 deletions

View File

@@ -25,6 +25,7 @@ func CleanupOldImages(ctx context.Context) error {
var images []model.Image
if err := repo.DB.Where("date < ?", threshold).Preload("Variants").Find(&images).Error; err != nil {
util.Logger.Error("Failed to query old images for cleanup", zap.Error(err))
return err
}