fix issue in debug for gdb
@@ -9,6 +9,8 @@ package gins
import (
"fmt"
+ "time"
+
"github.com/gogf/gf/g/container/gmap"
"github.com/gogf/gf/g/database/gdb"
"github.com/gogf/gf/g/database/gredis"
@@ -19,7 +21,6 @@ import (
"github.com/gogf/gf/g/text/gregex"
"github.com/gogf/gf/g/text/gstr"
"github.com/gogf/gf/g/util/gconv"
- "time"
)
const (
@@ -159,6 +160,13 @@ func parseDBConfigNode(value interface{}) *gdb.ConfigNode {
if value, ok := nodeMap["role"]; ok {
node.Role = gconv.String(value)
}
+ if value, ok := nodeMap["debug"]; ok {
+ if gconv.Bool(value) {
+ node.Debug = 2
+ } else {
+ node.Debug = 1
+ }
+ }
if value, ok := nodeMap["charset"]; ok {
node.Charset = gconv.String(value)
}
