Some Platform components have extra logging options available, or extra mechanisms for customizing logging.
6.2.1. SQL Logging with Hibernate
Hibernate has two ways to enable logging of SQL statements. These statements are most useful during the testing and debugging phases of application development.
The first way is to explicitly enable it in your code.
SessionFactory sf = new Configuration()
Alternately, you can configure Hibernate to send all SQL messages to log4j, using a specific facility:
additivity option controls whether these log messages are propagated upward to parent handlers, and is a matter of preference.