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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content