Closed methane closed 3 months ago
The MySQL connection code now provides enhanced logging with file name and line number details for better debugging. The log
method within the mysqlConn
struct has been updated to incorporate this information using runtime.Caller
and fmt
packages. This change aims to improve the clarity and context of log messages for easier troubleshooting.
File | Change Summary |
---|---|
connection.go |
The log function in the mysqlConn struct has been modified to include file name and line number information in the log output. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
go-sql-driver/mysql#1563 broke the filename:lineno prefix in the log message by introducing a helper function. This commit adds the "filename:line" prefix in the helper function instead of log.Lshortfile option to show correct filename:lineno.
Checklist