Archive for the ‘log4j’ Category

Logging in Ibatis

March 12, 2009

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>

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

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

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. 🙂

Advertisements

%d bloggers like this: