code: public int setTraceLevel(final int level) {
          final int oldLevel = traceLevel;
  
          // pin the value
          int theLevel = level;
          if (level < 0) {
              theLevel = 0;
          } else if (level > 4) {
              theLevel = 4;
          }
  
          traceLevel = theLevel;
  
          return oldLevel;
      }
docs: <p>
  Set the trace level for this connection. Normally tracing is off by
  default unless System property OtpConnection.trace was set.
  </p>
  
  <p>
  The following levels are valid: 0 turns off tracing completely, 1 shows
  ordinary send and receive messages, 2 shows control messages such as link
  and unlink, 3 shows handshaking at connection setup, and 4 shows
  communication with Epmd. Each level includes the information shown by the
  lower ones.
  </p>
  
  @param level
  the level to set.
  
  @return the previous trace level.