1.4. Logging
Hibernate Annotations utilizes Simple Logging Facade for Java (SLF4J) in order to log various system events. SLF4J can direct your logging output to several logging frameworks (NOP, Simple, log4j version 1.2, JDK 1.4 logging, JCL or logback) depending on your chosen binding. In order to setup logging properly you will need
slf4j-api.jar
in your classpath together with the jar file for your preferred binding - slf4j-log4j12.jar
in the case of Log4J. See the SLF4J documentation for more detail.
The logging categories interesting for Hibernate Annotations are:
Category | Function |
---|---|
org.hibernate.cfg | Log all configuration related events (not only annotations). |
For further category configuration refer to the Logging in the Hibernate Core documentation.