Logging in Ibatis

It will be too useful if you enable loggin in iBatis. Developers can use it extensively for debugging. Just add these lines at log4j.xml and Bingo!!! you will start getting logs for each ibatis and sql threads in  your system.

<logger name=”com.ibatis” additivity=”false”>
<level value=”debug”/>
<appender-ref ref=”PIPELINE”/>

<logger name=”java.sql” additivity=”false”>
<level value=”debug”/>
<appender-ref ref=”PIPELINE”/>

<logger name=”org.springframework” additivity=”false”>
<level value=”info”/>
<appender-ref ref=”PIPELINE”/>

where PIPELINE is the appender name I declared in the log4j.xml.

Tail Note : Don’t forget to remove iBatis logging when your system moves to production. The log file size will become more than 10 MB in 10 minutes of usage. 🙂


Tags: , ,

One Response to “Logging in Ibatis”

  1. Alok Guha Says:

    Thnx.. it worked like anything.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: