[ http://issues.apache.org/jira/browse/IBATIS-321?page=comments#action_12420132 ]
Jeff Butler commented on IBATIS-321: ------------------------------------ Actually, logging happens after the prepare, and before the execute. So if there's an error in the prepare, you can't see the SQL that caused the problem. This is likely the problem you are seeing. Nonetheless, I agree with you that this can make debugging very difficult if you have complex dynamic SQL statements. I'll take a look at changing this. > Logging of SQL statements happen after execution > ------------------------------------------------ > > Key: IBATIS-321 > URL: http://issues.apache.org/jira/browse/IBATIS-321 > Project: iBatis for Java > Type: Bug > Components: SQL Maps > Versions: 2.1.7 > Reporter: Jerome Gagner > > If you turn on Log4j logging for com.ibatis and java.sql.PrepartedStatement, > the logging of executed statements happen after the statement is executed. As > a result, if your SQL statement throws an exception, there is no way to view > the SQL that was run. This makes debugging very difficult with complex > sqlmaps. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira