From 750261a05ef977ee07754a6ed93488cb25375118 Mon Sep 17 00:00:00 2001 From: Evan Chen Date: Sun, 9 Jan 2022 03:43:24 +0800 Subject: [PATCH] update --- store/db.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/store/db.go b/store/db.go index 8af43b4..da52bb1 100644 --- a/store/db.go +++ b/store/db.go @@ -101,9 +101,10 @@ func New(t DBTYPE) *Store { func (s *Store) Connect() (db *gorm.DB, err error) { glog := logger.Default - l.Trace().Int("level", viper.GetInt("log.level")). + l.Trace(). + // Int("level", viper.GetInt("log.level")). // Bool("tog_info", (zerolog.Level(viper.GetInt("log.level")) <= zerolog.DebugLevel)). - Msg("log level") + Msgf("log level %v", viper.GetInt("log.level")) if zerolog.Level(viper.GetInt("log.level")) <= zerolog.DebugLevel { l.Debug().Msg("set gorm log level to info") glog.LogMode(logger.Info)