Log4j allows output to be logged anywhere from console to file to network ports to databases. But the simple configuration that you have is supposed to print on the console as well. So first remove the show_sql property to see if Log4j puts anything on the console at all.
If this doesn't work, it shows that Log4j is not configured correctly. If you're using hibernate > 3.5, it uses the slf4j api, which uses logback by default instead of log4j. You can easily switch to log4j by removing logback jar(s) from your classpath, and adding slf4j-log4j12.jar and log4j.jar instead.
The Log4j tracing also prints the queries using '?', but it also prints the parameter bindings, i.e. what the '?' will be replaced with by the database driver or server.
In order to setup logging you will need slf4j-api.jar in your classpath together with the jar file for your preferred binding - slf4j-log4j12.jar in the case of Log4J.
Put log4j.properties file in your classpath. An example properties file is distributed with Hibernate in the src/ directory.
Example of Hibernate Logging by Log4j using xml file : You can enable logging in hibernate by following only two steps in any hibernate example. This is the first example of hibernate application with logging support using log4j. Here we have to load the slf4j.jar and log4j.jar files with hibernate jar files.