You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Logger represents a logging collector. You can pass a logging collector to
// gosql.SetLogger(myCollector) to make it collect QueryStatus messages
// after executing a query.
type Logger interface {
Printf(format string, v ...interface{})
}
I use db.WithContext(ctx), set my [trace id] to ctx .
When we print a sql log, i can not get the [trace id] in ctx, so this log cannot be concatenated with other logs through [trace id].
Maybe we shoud change this interface to:
type Logger interface {
Printf(ctx context.Context, format string, v ...interface{})
}
The text was updated successfully, but these errors were encountered:
Maybe we shoud change this interface to:
The text was updated successfully, but these errors were encountered: