logback-android/src/main/java/ch/qos/logback/core/net/SyslogAppenderBase.java
static public int facilityStringToint(String facilityStr) {
    if ("KERN".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_KERN;
    } else if ("USER".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_USER;
    } else if ("MAIL".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_MAIL;
    } else if ("DAEMON".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_DAEMON;
    } else if ("AUTH".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUTH;
    } else if ("SYSLOG".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_SYSLOG;
    } else if ("LPR".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LPR;
    } else if ("NEWS".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_NEWS;
    } else if ("UUCP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_UUCP;
    } else if ("CRON".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_CRON;
    } else if ("AUTHPRIV".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUTHPRIV;
    } else if ("FTP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_FTP;
    } else if ("NTP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_NTP;
    } else if ("AUDIT".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUDIT;
    } else if ("ALERT".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_ALERT;
    } else if ("CLOCK".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_CLOCK;
    } else if ("LOCAL0".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL0;
    } else if ("LOCAL1".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL1;
    } else if ("LOCAL2".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL2;
    } else if ("LOCAL3".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL3;
    } else if ("LOCAL4".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL4;
    } else if ("LOCAL5".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL5;
    } else if ("LOCAL6".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL6;
    } else if ("LOCAL7".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL7;
    } else {
      throw new IllegalArgumentException(facilityStr
          + " is not a valid syslog facility string");
    }
  }
static public int facilityStringToint(String facilityStr) {
    if ("KERN".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_KERN;
    } else if ("USER".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_USER;
    } else if ("MAIL".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_MAIL;
    } else if ("DAEMON".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_DAEMON;
    } else if ("AUTH".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUTH;
    } else if ("SYSLOG".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_SYSLOG;
    } else if ("LPR".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LPR;
    } else if ("NEWS".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_NEWS;
    } else if ("UUCP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_UUCP;
    } else if ("CRON".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_CRON;
    } else if ("AUTHPRIV".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUTHPRIV;
    } else if ("FTP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_FTP;
    } else if ("NTP".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_NTP;
    } else if ("AUDIT".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_AUDIT;
    } else if ("ALERT".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_ALERT;
    } else if ("CLOCK".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_CLOCK;
    } else if ("LOCAL0".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL0;
    } else if ("LOCAL1".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL1;
    } else if ("LOCAL2".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL2;
    } else if ("LOCAL3".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL3;
    } else if ("LOCAL4".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL4;
    } else if ("LOCAL5".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL5;
    } else if ("LOCAL6".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL6;
    } else if ("LOCAL7".equalsIgnoreCase(facilityStr)) {
      return SyslogConstants.LOG_LOCAL7;
    } else {
      throw new IllegalArgumentException(facilityStr
          + " is not a valid syslog facility string");
    }
  }
static public int facilityStringToint ( String facilityStr ) { if ( "KERN" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_KERN ; } else if ( "USER" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_USER ; } else if ( "MAIL" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_MAIL ; } else if ( "DAEMON" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_DAEMON ; } else if ( "AUTH" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_AUTH ; } else if ( "SYSLOG" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_SYSLOG ; } else if ( "LPR" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LPR ; } else if ( "NEWS" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_NEWS ; } else if ( "UUCP" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_UUCP ; } else if ( "CRON" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_CRON ; } else if ( "AUTHPRIV" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_AUTHPRIV ; } else if ( "FTP" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_FTP ; } else if ( "NTP" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_NTP ; } else if ( "AUDIT" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_AUDIT ; } else if ( "ALERT" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_ALERT ; } else if ( "CLOCK" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_CLOCK ; } else if ( "LOCAL0" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL0 ; } else if ( "LOCAL1" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL1 ; } else if ( "LOCAL2" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL2 ; } else if ( "LOCAL3" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL3 ; } else if ( "LOCAL4" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL4 ; } else if ( "LOCAL5" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL5 ; } else if ( "LOCAL6" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL6 ; } else if ( "LOCAL7" . equalsIgnoreCase ( facilityStr ) ) { return SyslogConstants . LOG_LOCAL7 ; } else { throw new IllegalArgumentException ( facilityStr + " is not a valid syslog facility string" ) ; } }
Returns the integer value corresponding to the named syslog facility.

@param facilityStr the syslog facility name
@return the syslog facility code
@throws IllegalArgumentException
if the facility string is not recognized
Returns the integer value corresponding to the named syslog facility .