Olivier Lefevre wrote: > I am developing a service. How can I enable query tracing so that > Query.list() appends the SQL or HQL form of the query to one of the > Tomcat log files? My 'or' queries (Restrictions.or) seem to work > ok but not my 'and' queries and I'd like to see what's going on.
This can be enabled in the log4j.properties file which you find in the WEB-INF/classes folder. There are a lot of options but the one you are looking for is: log4j.logger.net.sf.basedb.core.query.ql=debug Just uncomment this and the HQL/SQL should be logged. If your query is a HQL query you may want the SQL Hibernate generates as well. This is controlled by log4j.logger.org.hibernate.SQL=debug. /Nicklas ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get _______________________________________________ basedb-devel mailing list basedb-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/basedb-devel