code: public synchronized static final void destroyInstance(String protocol) throws SyslogRuntimeException {
          if (protocol == null || "".equals(protocol.trim())) {
              return;
          }
  
          String _protocol = protocol.toLowerCase();
  
          if (instances.containsKey(_protocol)) {
              SyslogUtility.sleep(SyslogConstants.THREAD_LOOP_INTERVAL_DEFAULT);
  
              SyslogIF syslog = (SyslogIF) instances.get(_protocol);
  
              try {
                  syslog.shutdown();
  
              } finally {
                  instances.remove(_protocol);
              }
  
          } else {
              throwRuntimeException("Cannot destroy protocol \"" + protocol + "\" instance; call shutdown instead");
              return;
          }
      }
docs: destroyInstance() gracefully shuts down the specified Syslog protocol and
  removes the instance from Syslog4j.
  
  @param protocol - the Syslog protocol to destroy
  @throws SyslogRuntimeException