How do I log SQL queries and parameter values from Hibernate in JBoss?

Solution Verified - Updated -

Issue

  • How to find out what SQL queries are being sent from JBoss to the database?
  • How to configure hibernate to print SQL parameter values? Not just the SQL but what values it binds to an insert or update.

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7
    • 6
    • 5
    • 4
  • Hibernate
    • 5
    • 4
    • 3

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.