Merge pull request #8025 from fuweid/enhance-testlog
log/logtest: add `testcase` as debug field
This commit is contained in:
commit
0b81378be6
@ -52,5 +52,5 @@ func WithT(ctx context.Context, t testing.TB) context.Context {
|
||||
},
|
||||
})
|
||||
|
||||
return log.WithLogger(ctx, logrus.NewEntry(l))
|
||||
return log.WithLogger(ctx, logrus.NewEntry(l).WithField("testcase", t.Name()))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user