-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Description
// 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{})
}
Metadata
Metadata
Assignees
Labels
No labels