ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephen Friedrich <stephen.friedr...@fortis-it.eu>
Subject AW: Enabling iBatis 3 logging
Date Wed, 14 Apr 2010 05:35:02 GMT
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:cowwoc@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-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org


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


Mime
View raw message