code: public static final SyslogIF getInstance(String protocol) throws SyslogRuntimeException {
          String _protocol = protocol.toLowerCase();
  
          if (instances.containsKey(_protocol)) {
              return (SyslogIF) instances.get(_protocol);
  
          } else {
              StringBuffer message = new StringBuffer("Syslog protocol \"" + protocol + "\" not defined; call Syslogger.createSyslogInstance(protocol,config) first");
  
              if (instances.size() > 0) {
                  message.append(" or use one of the following instances: ");
  
                  Iterator i = instances.keySet().iterator();
                  while (i.hasNext()) {
                      String k = (String) i.next();
  
                      message.append(k);
                      if (i.hasNext()) {
                          message.append(' ');
                      }
                  }
              }
  
              throwRuntimeException(message.toString());
              return null;
          }
      }
docs: Use getInstance(protocol) as the starting point for Syslog4j.
  
  @param protocol - the Syslog protocol to use, e.g. "udp", "tcp", "unix_syslog", "unix_socket", or a custom protocol
  @return Returns an instance of SyslogIF.
  @throws SyslogRuntimeException