Logo Search packages:      
Sourcecode: jenkins-trilead-ssh2 version File versions  Download package

synchronized void com::trilead::ssh2::Connection::enableDebugging ( boolean  enable,
DebugLogger  logger 
) [inline]

Enable/disable debug logging. Only do this when requested by Trilead support.

For speed reasons, some static variables used to check whether debugging is enabled are not protected with locks. In other words, if you dynamicaly enable/disable debug logging, then some threads may still use the old setting. To be on the safe side, enable debugging before doing the connect() call.

Parameters:
enableon/off
loggera DebugLogger instance, null means logging using the simple logger which logs all messages to to stderr. Ignored if enabled is false

Definition at line 1375 of file Connection.java.

      {
            Logger.enabled = enable;

            if (enable == false)
            {
                  Logger.logger = null;
            }
            else
            {
                  if (logger == null)
                  {
                        logger = new DebugLogger()
                        {

                              public void log(int level, String className, String message)
                              {
                                    long now = System.currentTimeMillis();
                                    System.err.println(now + " : " + className + ": " + message);
                              }
                        };
                  }
            }
      }

Generated by  Doxygen 1.6.0   Back to index