Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8343395

SSLLogger doesn't work for formatted messages

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • security-libs
    • None

      The current SSLLogger supports a simple Console Logger when a value is passed to the javax.net.debug system property or the System.Logger if no value is passed to the javax.net.debug property.

      Formatted log statements generated from code like the following are not logged when a System.Logger type implementation is in place.

                  ServerHelloMessage shm = new ServerHelloMessage(chc, message);
                  if (SSLLogger.isOn() && SSLLogger.isOn("ssl,handshake")) {
                      SSLLogger.fine("Consuming ServerHello handshake message", shm);
                  }

      the code boils down to a logger.log call like:

      String formatted = SSLSimpleFormatter.formatParameters(params);
      logger.log(level, msg, formatted);

      "msg" doesn't facilitate the use of the formatted parameters. The inner SSLConsoleLogger does format the fields correctly and ensures the relevant data is printed when the simple console logger is in use.

            coffeys Sean Coffey
            coffeys Sean Coffey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: