Merge branch 'master' into master_0124
This commit is contained in:
commit
2ed935c349
|
@ -757,7 +757,7 @@ func (session *Session) incrVersionFieldValue(fieldValue *reflect.Value) {
|
||||||
|
|
||||||
// Context sets the context on this session
|
// Context sets the context on this session
|
||||||
func (session *Session) Context(ctx context.Context) *Session {
|
func (session *Session) Context(ctx context.Context) *Session {
|
||||||
if session.ctx != nil {
|
if session.engine.logSessionID && session.ctx != nil {
|
||||||
ctx = context.WithValue(ctx, log.SessionIDKey, session.ctx.Value(log.SessionIDKey))
|
ctx = context.WithValue(ctx, log.SessionIDKey, session.ctx.Value(log.SessionIDKey))
|
||||||
ctx = context.WithValue(ctx, log.SessionKey, session.ctx.Value(log.SessionKey))
|
ctx = context.WithValue(ctx, log.SessionKey, session.ctx.Value(log.SessionKey))
|
||||||
ctx = context.WithValue(ctx, log.SessionShowSQLKey, session.ctx.Value(log.SessionShowSQLKey))
|
ctx = context.WithValue(ctx, log.SessionShowSQLKey, session.ctx.Value(log.SessionShowSQLKey))
|
||||||
|
|
Loading…
Reference in New Issue