Logging

Tornado Query uses SLF4J for logging. You should provide a log4j.properties in your application to make sure you receive the wanted logging information.

A good starting point is this configuration:

log4j.rootLogger=ERROR,A1

log4j.logger.org.apache.commons.beanutils.converters=ERROR

log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d{ISO8601} [%t] %-5p %c %x - %m%n

If you want to output the SQL statement that Tornado Query executes, you can set the log level to DEBUG. You can also retrieve the SQL to be executed by printing out the statement created by the prepare method:

String sql = Query.byId(CustomerMapper.FULL, 1).prepare().toString()