1 Reply Latest reply on Jan 9, 2005 12:28 PM by starksm64

    Log$J and RMISSLClientSocketFactory

    davehaas

      Hi all.

      I'm trying to configure the log4j system to spit out debug logging messages to the console for ssl communications.

      My understanding is that all I should really have to do is insert into the log4j.xml file something like:

      <category name="org.jboss.security.ssl.RMISSLClientSocketFactory">
       <appender-ref ref="CONSOLE"/>
      </category>
      


      but that's not working. Nothing comes out on the console.

      Note that I have changed the console appender to spit out debug messages instead of the usual info messages.

      On the client I get a warning that says:

      log4j:WARN No appenders could be found for logger (org.jboss.security.ssl.RMISSLClientSocketFactory).
      log4j:WARN Please initialize the log4j system properly.
      


      Thoughts?

      Dave

        • 1. Re: Log$J and RMISSLClientSocketFactory
          starksm64

          You need to configure your client log4j setup correctly as indicated.

          Most ssl info would come from the jsse layer which requires -Djava

          http://java.sun.com/j2se/1.4.2/docs/guide/security/jsse/JSSERefGuide.html#Debug


          To view the options of the JSSE dynamic debug utility, use the following command-line option on the java command:

          -Djavax.net.debug=help

          Note: If you specify the value help with either dynamic debug utility when running a program that does not use any classes that the utility was designed to debug, you will not get the debugging options.

          Here is a complete example of how to get a list of the debug options:

          java -Djavax.net.debug=help MyApp

          where MyApp is an application that uses some of the JSSE classes. MyApp will not run after the debug help information is printed, as the help code causes the application to exit.

          Here are the current options:

          all turn on all debugging
          ssl turn on ssl debugging

          The following can be used with ssl:
          record enable per-record tracing
          handshake print each handshake message
          keygen print key generation data
          session print session activity
          defaultctx print default SSL initialization
          sslctx print SSLContext tracing
          sessioncache print session cache tracing
          keymanager print key manager tracing
          trustmanager print trust manager tracing

          handshake debugging can be widened with:
          data hex dump of each handshake message
          verbose verbose handshake message printing

          record debugging can be widened with:
          plaintext hex dump of record plaintext

          The javax.net.debug property value must specify either all or ssl, optionally followed by debug specifiers. You can use one or more options. You do not have to have a separator between options, although a separator such as ":" or "," helps readability. It doesn't matter what separators you use, and the ordering of the option keywords is also not important.