[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - Hibernate logging facilities
Ajaleo
do-not-reply at jboss.com
Tue Aug 8 05:59:08 EDT 2006
Hi all!
I'm using EJB 3.0 with hibernate and I'd like to log all the SQL queries that are performed by Hibernate. I've changed the log4j.xml to get the queries with the following code
| <category name="org.hibernate">
| <priority value="DEBUG"/>
| </category>
|
|
| <!-- Log SQL statements-->
| <category name="org.hibernate.SQL">
| <priority value="DEBUG"/>
| </category>
|
| <!-- Log the values assigned to the SQL parameters and results -->
| <category name="org.hibernate.type">
| <priority value="DEBUG"/>
| </category>
|
| <!-- print EJBQL and parameters -->
| <category name="org.hibernate.impl.SessionImpl">
| <priority value="debug"/>
| </category>
|
| <category name="org.hibernate.engine.QueryParameters">
| <priority value="debug" />
| </category>
|
In the server.log I could read several messages like this one:
2006-08-08 11:26:29,203 DEBUG [org.hibernate.SQL] insert into TRABAJOLABORATORIO (TECNICOLABORATORIO, FECHAESTADO, DESCRIPCION, FECHAPREVENTPIEZA, EST
| ADOPIEZA, IDPRODUCTO, IDEVOLUCIONDISENYOACEPTADA, IDPRIMERAEVOLUCION, TIPOPIEZA, IDLINEASOLICITUDSERIE, IDTRABAJO) values (?, ?, ?, ?, ?, ?, ?, ?, ?,
| ?, ?)
and previously some assignations to the parameters of the entities but what i'd like to get is not the ? but the real values of the SQL query.
Could you help me?
Sorry for my English
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3963755#3963755
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3963755
More information about the jboss-user
mailing list