Site icon Voina Blog (a tech warrior's blog)

Enable logging of Hibernate statements and parameters in JBoss (WildFly)

Advertisements

To enable logging of Hibernate statements and parameters in JBoss (now known as WildFly), you’ll need to adjust the logging configuration to capture the necessary Hibernate SQL logging information.

Configure JBoss/WildFly Logging for Hibernate

  1. Open the standalone.xml (or domain.xml) configuration file:
    • This file is located in the JBOSS_HOME/standalone/configuration directory for standalone mode or JBOSS_HOME/domain/configuration for domain mode.
  2. Find the <subsystem> tag for logging.
  3. Add the following logger entries:
    <logger category="org.hibernate.SQL">
        <level name="DEBUG"/>
    </logger>
     <logger category="org.hibernate.type.descriptor.sql.BasicBinder">
        <level name="TRACE"/>
     </logger>

4. Restart Jboss

Exit mobile version