littlecowk35 / eic-quan-ly-cong-van

Automatically exported from code.google.com/p/eic-quan-ly-cong-van
0 stars 0 forks source link

How to enable SQL statement in Liferay #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
To show the SQL sentences like:
select COUNT(*) as col_0_0_ from BlogsEntry blogsentry0_ where 
(blogsentry0_.displayDate<? )AND(blogsentry0_.status=? )

Original issue reported on code.google.com by ntanh...@gmail.com on 22 Jan 2015 at 9:05

GoogleCodeExporter commented 9 years ago
Add the following lines in the files:
tomcat-7.0.42/webapps/ROOT/WEB-INF/classes/log4j.properties

log4j.logger.org.hibernate=INFO
log4j.logger.org.hibernate.SQL=DEBUG
log4j.logger.org.hibernate.type=TRACE

Original comment by ntanh...@gmail.com on 22 Jan 2015 at 9:06

GoogleCodeExporter commented 9 years ago
Add this line in file: 
tomcat-7.0.42/webapps/ROOT/WEB-INF/classes/portal-ext.properties
hibernate.show_sql=true

Original comment by ntanh...@gmail.com on 22 Jan 2015 at 9:07