- update log

master
李光春 2 years ago
parent a8db9e83da
commit 210bc14233

@ -35,11 +35,17 @@ func NewApiClient(attrs ...*OperationAttr) (*ApiClient, error) {
c := &ApiClient{}
for _, attr := range attrs {
log.Println(attr)
c.gormClient = attr.gormClient
c.mongoCollectionClient = attr.mongoCollectionClient
c.config.logType = attr.logType
c.config.tableName = attr.tableName
if attr.gormClient != nil {
c.gormClient = attr.gormClient
c.config.logType = attr.logType
}
if attr.mongoCollectionClient != nil {
c.mongoCollectionClient = attr.mongoCollectionClient
c.config.logType = attr.logType
}
if attr.tableName != "" {
c.config.tableName = attr.tableName
}
}
switch c.config.logType {

@ -30,10 +30,17 @@ func NewGinClient(attrs ...*OperationAttr) (*GinClient, error) {
c := &GinClient{}
for _, attr := range attrs {
c.gormClient = attr.gormClient
c.mongoCollectionClient = attr.mongoCollectionClient
c.config.logType = attr.logType
c.config.tableName = attr.tableName
if attr.gormClient != nil {
c.gormClient = attr.gormClient
c.config.logType = attr.logType
}
if attr.mongoCollectionClient != nil {
c.mongoCollectionClient = attr.mongoCollectionClient
c.config.logType = attr.logType
}
if attr.tableName != "" {
c.config.tableName = attr.tableName
}
}
switch c.config.logType {

Loading…
Cancel
Save