Monday, December 24, 2018

Enable SSL logs in Java

To enable SSL logs add the below JVM arguments to your program.

The below JVM argument enable only the ssl logs.
-Djavax.net.debug=SSL

The below JVM argument will turn on all debugging logs .
-Djavax.net.debug=ALL
Java Command Line:
$>    java -Djavax.net.debug=SSL SampleClass

Most of the IDE will have Java VM arguments tab where you can add the above arguments to utilize at run time.

Sample Eclipse IDE: