We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 961210b commit 80e2d8fCopy full SHA for 80e2d8f
connection.go
@@ -50,16 +50,16 @@ type mysqlConn struct {
50
// Helper function to call per-connection logger.
51
func (mc *mysqlConn) log(v ...any) {
52
_, filename, lineno, ok := runtime.Caller(1)
53
- prefix := ""
54
if ok {
55
- pos = strings.LastIndexByte(filename, '/')
+ pos := strings.LastIndexByte(filename, '/')
56
if pos != -1 {
57
filename = filename[pos+1:]
58
}
59
- prefix = fmt.Sprintf("%s:%d: ", filename, lineno)
+ prefix := fmt.Sprintf("%s:%d ", filename, lineno)
+ v = append([]any{prefix}, v...)
60
61
62
- mc.cfg.Logger.Print(prefix, v...)
+ mc.cfg.Logger.Print(v...)
63
64
65
// Handles parameters set in DSN after the connection is established
0 commit comments