How to create a separate log file for Hibernate generated SQLs in JBoss EAP6

Solution Verified - Updated -

Issue

In the application persistence.xml, the hibernate.show_sql property is set to true. Hibernate is currently logging the generated SQLs in the JBoss server log. Is there a way to have JBoss EAP 6 write these log messages to a separate file instead of server.log?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 6.x

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.