code: public static final SyslogIF createInstance(String protocol, SyslogConfigIF config) throws SyslogRuntimeException {
          if (protocol == null || "".equals(protocol.trim())) {
              throwRuntimeException("Instance protocol cannot be null or empty");
              return null;
          }
  
          if (config == null) {
              throwRuntimeException("SyslogConfig cannot be null");
              return null;
          }
  
          String syslogProtocol = protocol.toLowerCase();
  
          SyslogIF syslog = null;
  
          synchronized (instances) {
              if (instances.containsKey(syslogProtocol)) {
                  throwRuntimeException("Syslog protocol \"" + protocol + "\" already defined");
                  return null;
              }
  
              try {
                  Class syslogClass = config.getSyslogClass();
  
                  syslog = (SyslogIF) syslogClass.newInstance();
  
              } catch (ClassCastException cse) {
                  if (!config.isThrowExceptionOnInitialize()) {
                      throw new SyslogRuntimeException(cse);
  
                  } else {
                      return null;
                  }
  
              } catch (IllegalAccessException iae) {
                  if (!config.isThrowExceptionOnInitialize()) {
                      throw new SyslogRuntimeException(iae);
  
                  } else {
                      return null;
                  }
  
              } catch (InstantiationException ie) {
                  if (!config.isThrowExceptionOnInitialize()) {
                      throw new SyslogRuntimeException(ie);
  
                  } else {
                      return null;
                  }
              }
  
              syslog.initialize(syslogProtocol, config);
  
              instances.put(syslogProtocol, syslog);
          }
  
          return syslog;
      }
docs: Use createInstance(protocol,config) to create your own Syslog instance.
  <p/>
  <p>First, create an implementation of SyslogConfigIF, such as UdpNetSyslogConfig.</p>
  <p/>
  <p>Second, configure that configuration instance.</p>
  <p/>
  <p>Third, call createInstance(protocol,config) using a short &amp; simple
  String for the protocol argument.</p>
  <p/>
  <p>Fourth, either use the returned instance of SyslogIF, or in later code
  call getInstance(protocol) with the protocol chosen in the previous step.</p>
  
  @param protocol
  @param config
  @return Returns an instance of SyslogIF.
  @throws SyslogRuntimeException