All DB calls are logged on a debug level by default, so you can try to enable logging on debug (default is on info) in log4j config file (server/*/conf/log4j.xml).
Also please note that logging on debug level kills performance and must not be used on a production system.
If you want to turn on just SQL logging you can do the following in log4j.xml:
1. Comment out the Threshold node of the CONSOLE appender - otherwise DEBUG events will never be displayed:
2. Set the root priority to INFO so that we don't create loads of output:
3. Finally create a category based upon cmp.jdbc
4. Save the file - after 1 minute the log4j xml is reparsed and hey presto JDBC log messages appear e.g:
14:33:27,834 DEBUG [findByPrimaryKey] Executing SQL: SELECT Company_Id FROM COMPANY_XML WHERE Company_Id=?
Just tried your instructions and they work perfectly.
Would it be worth adding this to the CMP documentation?