Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I configure OpenJPA SQL logging?

Tags:

openjpa

What is the OpenJPA configuration to view SQL query executed in a database? I would like to view the query with all parameters executed in log or console instead of viewing the JPQL query

like image 887
user1400965 Avatar asked May 24 '12 07:05

user1400965


1 Answers

<property name="openjpa.Log" value="SQL=Trace" />

Enables logging of all SQL statements, minus parameter values.

<property name="openjpa.ConnectionFactoryProperties" value="PrintParameters=true" />

Enables logging of SQL parameters.

Logging documentation

like image 153
Rick Avatar answered Oct 19 '22 07:10

Rick