Welcome Guest, Not a member yet? Register   Sign In
Optional backtrace on logged SQL errors
#1

I've searched this but couldn't find anything in requests, and this isn't available in CI 3.10.0, so here goes.

Would it make sense to add backtrace to SQL errors that are saved in log file?

For any bigger site / application, without any context it's hard to match breaking SQL query with actual code snippet.

Another solution, add optional SQL comment in the end of every query ( SELECT * FROM table -- PHP file [_LINE_] ) - that way it'll be part of the query and automatically gets saved, and it would be beneficial if let's say slow queries are saved by DB server, easy to see link between SQL statement and script that called it.
Reply


Messages In This Thread
Optional backtrace on logged SQL errors - by Pertti - 10-14-2016, 08:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB