Debugging JVM flags

Just a couple of interesting flags when we are executing/debugging a Java web based application.

First one, it is just to change the logging level without modifiying our properties file:

-Dlogging.level.com.wordpress.binarycoders=DEBUG

Second one, it is in case we are using Hibernate as ORM. It will allow us to see the executed SQL queries in the log:

-Dhibernate.show_sql=true

They just need to be added as a “VM Options” when the server is started or the JAR file is run.

Advertisements
Debugging JVM flags