Replace all the references to sun.security.util.Debug so we can route it through a real logger.
Fix debugging to work with a logger.
Fix the logging