update
parent
e15d29b758
commit
db40830da2
|
@ -99,8 +99,14 @@ func New(t DBTYPE) *Store {
|
|||
|
||||
// Connect to db and store db connection to var DB
|
||||
func (s *Store) Connect() (db *gorm.DB, err error) {
|
||||
|
||||
glog := logger.Default
|
||||
if zerolog.Level(viper.GetInt("log.level")) == zerolog.DebugLevel {
|
||||
glog.LogMode(logger.Info)
|
||||
}
|
||||
|
||||
s.config = &gorm.Config{
|
||||
Logger: logger.Default.LogMode(logger.Info),
|
||||
Logger: glog,
|
||||
SkipDefaultTransaction: true,
|
||||
}
|
||||
if s.Prod {
|
||||
|
|
Loading…
Reference in New Issue