gorm日志增加默认的trace_id field
This commit is contained in:
parent
e655c031b2
commit
9b861374e3
@ -32,6 +32,9 @@ func NewGormV2(loggerLevel zapcore.Level, consoleOutput bool, encoder zapcore.En
|
||||
if nil != err {
|
||||
return nil, err
|
||||
}
|
||||
if len(traceIDField) == 0 {
|
||||
traceIDField = "trace_id"
|
||||
}
|
||||
return &Gorm{
|
||||
instance: logInstance,
|
||||
}, nil
|
||||
|
Loading…
Reference in New Issue
Block a user