update logger
This commit is contained in:
parent
b0953d706e
commit
91c174b80f
@ -245,7 +245,7 @@ func (c *client) GetDatabaseClient(conf *Driver, logInstance *zap.Logger) (*gorm
|
||||
return nil, fmt.Errorf("%v : db driver is not support", conf.DBType)
|
||||
}
|
||||
|
||||
instance.Logger = wrapper.NewGormLoggerWithInstance(instance, logInstance, "", nil)
|
||||
instance.Logger = wrapper.NewGormLoggerWithInstance(nil, instance, logInstance, "", nil)
|
||||
|
||||
return instance, nil
|
||||
}
|
||||
@ -323,5 +323,5 @@ func (dc *DBClient) GetSlave(ctx context.Context) *gorm.DB {
|
||||
//
|
||||
// Date : 3:45 PM 2021/12/24
|
||||
func (dc *DBClient) getLogger(ctx context.Context, dbClient *gorm.DB, node string) gormLogger.Interface {
|
||||
return wrapper.NewGormLoggerWithInstance(dbClient, dc.loggerInstance, dc.dbFlag+"|"+node, dc.extraFieldList)
|
||||
return wrapper.NewGormLoggerWithInstance(ctx, dbClient, dc.loggerInstance, dc.dbFlag+"|"+node, dc.extraFieldList)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user