(Important Note: this information applies to iBATIS version 2.1.5 running on WebSphere 6.0)
Even though iBATIS is no longer dependant on Jakarta Commons Logging (JCL), iBATIS will use JCL if it exists in the classpath. WebSphere supplies JCL in the application server classpath, so iBATIS running on WebSphere will always use JCL.
On WebSphere, JCL provides the entry point into the WebSphere logging infrastructure. This means that iBATIS logging can be configured using the standard WebSphere administrative tools, and can be enabled/disabled on the fly.
To enable logging:
- Start the administrative console
- Navigate to Troubleshooting->Logs and Trace
- Select your server (usually "server1")
- Select "Change Log Detail Levels"
- Select the "Runtime" Tab
- Add logging strings as needed (delimited by colons):
- Press "OK/Apply"
Logging information will now be available in the WebSphere trace file (usually called "trace.log" in your application server logs directory).
Note that these instructions are used to enable/disable logging on the fly. If you want to permanently enable/disable logging, then make the above changes on the "Configuration" tab, rather than the "Runtime" tab.