diff --git a/backend/db/db.go b/backend/db/db.go index 260c3af..ca8010d 100644 --- a/backend/db/db.go +++ b/backend/db/db.go @@ -20,7 +20,7 @@ func Init(sqlitePath string) { Colorful: false, IgnoreRecordNotFoundError: true, ParameterizedQueries: false, - LogLevel: logger.Info, + LogLevel: logger.Warn, }, ) var openDb *gorm.DB diff --git a/main.go b/main.go index 4aa1fc0..2a11de4 100644 --- a/main.go +++ b/main.go @@ -216,7 +216,7 @@ func initStockDataUS() { var count int64 db.Dao.Model(&models.StockInfoUS{}).Where("code = ?", item.Code).Count(&count) if count > 0 { - log.SugaredLogger.Infof("stock data us %s exist", item.Code) + //log.SugaredLogger.Infof("stock data us %s exist", item.Code) continue } db.Dao.Model(&models.StockInfoUS{}).Create(&item) @@ -235,7 +235,7 @@ func initStockDataHK() { var count int64 db.Dao.Model(&models.StockInfoHK{}).Where("code = ?", item.Code).Count(&count) if count > 0 { - log.SugaredLogger.Infof("stock data hk %s exist", item.Code) + //log.SugaredLogger.Infof("stock data hk %s exist", item.Code) continue } db.Dao.Model(&models.StockInfoHK{}).Create(&item)