update
parent
9795ce0509
commit
750261a05e
|
@ -101,9 +101,10 @@ func New(t DBTYPE) *Store {
|
||||||
func (s *Store) Connect() (db *gorm.DB, err error) {
|
func (s *Store) Connect() (db *gorm.DB, err error) {
|
||||||
|
|
||||||
glog := logger.Default
|
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)).
|
// 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 {
|
if zerolog.Level(viper.GetInt("log.level")) <= zerolog.DebugLevel {
|
||||||
l.Debug().Msg("set gorm log level to info")
|
l.Debug().Msg("set gorm log level to info")
|
||||||
glog.LogMode(logger.Info)
|
glog.LogMode(logger.Info)
|
||||||
|
|
Loading…
Reference in New Issue