Limiting Java Ssl Debug Logging

Totally disabling java net ssl debug logging

The problem is that the tomcat application is overwriting whatever value you give from command line, and if there is no way to control what this code is doing, you can't really overwrite it from commandline arguments. While a security manager would be able to prevent setting a property, it can only do so by throwing an exception, which is probably going to cause more issues than it solves.

In this case, your only option is to set the value yourself from code, after the other code sets it.

In case of the javax.net.debug, the option needs to be set to it's final value before the static static initializer of sun.* Debug class runs, which is before the first message would appear. This can be disabled by any value that isn't used as some option (empty string, or none should disable it). If it's set later, it will have no effect with no way to turn it off after the fact (with the exception of doing some bad reflection hacks to access internals of that class anyway, that are only possible with java 8 and earlier)

Location for SSL debug logging in java

They aren't stored anywhere. They are printed to System.out or System.err.



Related Topics



Leave a reply



Submit