Using this log4j configuration I am getting all sql statements added to the 
"sql"
appender:

    <!--
            iBatis
    -->
    <category name="com.ibatis" additivity="false">
        <priority value="debug"/>
        <appender-ref ref="sql"/>
    </category>

    <!-- iBatis also uses standard java.sql classes as log categories -->

    <!-- Log query results -->
    <category name="java.sql.ResultSet" additivity="false">
        <priority value="error"/>
        <appender-ref ref="sql"/>
    </category>
    
    <!-- Log connections, prepared statements etc.  -->
    <category name="java.sql" additivity="false">
        <priority value="debug"/>
        <appender-ref ref="sql"/>
    </category>



-----Ursprüngliche Nachricht-----
Von: cowwoc [mailto:cow...@bbs.darktech.org] 
Gesendet: Mittwoch, 14. April 2010 01:17
An: user-java@ibatis.apache.org
Betreff: Enabling iBatis 3 logging

Hi,

     I'm getting this exception:

[snip]
    operation: setValue
    org.apache.ibatis.exceptions.IbatisException:
    ### Error updating database.  Cause: 
org.postgresql.util.PSQLException: ERROR: syntax error at or near "WHERE"
      Position: 68
[snip]

     The annoying thing is I can't find an easy way to find out what 
postiion 68 refers to. I wish that iBatis would include the SQL 
statement in the exception message.

     I remember seeing iBatis log SQL statements when I first started 
playing with it last week. I suppressed them somehow and I forget how. 
Could someone please help me figure out how to re-enable them?

PS: I am using "ibaguice", Guice 2.0, and iBatis 3 annotations (no xml 
files at all).

Thanks,
Gili

---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscr...@ibatis.apache.org
For additional commands, e-mail: user-java-h...@ibatis.apache.org

Reply via email to