[DBAL-39] SQL Logger should log the last failed query Created: 04/Aug/10  Updated: 15/Aug/10  Resolved: 15/Aug/10

Status: Resolved
Project: Doctrine DBAL
Component/s: None
Affects Version/s: 2.0.0-BETA3
Fix Version/s: 2.0.0-BETA4

Type: Improvement Priority: Major
Reporter: Michael Ridgway Assignee: Benjamin Eberlei
Resolution: Fixed Votes: 0
Labels: None


 Description   

The SQL Logger is only called after a query has been executed (this was changed to allow profiling of the queries). This makes it difficult to determine which query has failed.

The commit that changed the functionality is at: http://github.com/doctrine/dbal/commit/fe0f0e4b8c6c5308cab3d683c552f61317de7067

It seems that the logger interface needs to be changed to two functions, a pre-query function and a post-query function. Profiling should be handled by the logger if it chooses and not by the connection class.



 Comments   
Comment by Benjamin Eberlei [ 15/Aug/10 ]

After lots of thinking i changed the Logger again to have a startQuery() and a stopQuery() method now.

Generated at Tue Sep 02 06:59:14 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.