@Test public void testFacilityStringToint() throws InterruptedException { assertEquals(SyslogConstants.LOG_KERN, SyslogAppenderBase.facilityStringToint("KERN")); assertEquals(SyslogConstants.LOG_USER, SyslogAppenderBase.facilityStringToint("USER")); assertEquals(SyslogConstants.LOG_MAIL, SyslogAppenderBase.facilityStringToint("MAIL")); assertEquals(SyslogConstants.LOG_DAEMON, SyslogAppenderBase.facilityStringToint("DAEMON")); assertEquals(SyslogConstants.LOG_AUTH, SyslogAppenderBase.facilityStringToint("AUTH")); assertEquals(SyslogConstants.LOG_SYSLOG, SyslogAppenderBase.facilityStringToint("SYSLOG")); assertEquals(SyslogConstants.LOG_LPR, SyslogAppenderBase.facilityStringToint("LPR")); assertEquals(SyslogConstants.LOG_NEWS, SyslogAppenderBase.facilityStringToint("NEWS")); assertEquals(SyslogConstants.LOG_UUCP, SyslogAppenderBase.facilityStringToint("UUCP")); assertEquals(SyslogConstants.LOG_CRON, SyslogAppenderBase.facilityStringToint("CRON")); assertEquals(SyslogConstants.LOG_AUTHPRIV, SyslogAppenderBase.facilityStringToint("AUTHPRIV")); assertEquals(SyslogConstants.LOG_FTP, SyslogAppenderBase.facilityStringToint("FTP")); assertEquals(SyslogConstants.LOG_NTP, SyslogAppenderBase.facilityStringToint("NTP")); assertEquals(SyslogConstants.LOG_AUDIT, SyslogAppenderBase.facilityStringToint("AUDIT")); assertEquals(SyslogConstants.LOG_ALERT, SyslogAppenderBase.facilityStringToint("ALERT")); assertEquals(SyslogConstants.LOG_CLOCK, SyslogAppenderBase.facilityStringToint("CLOCK")); assertEquals(SyslogConstants.LOG_LOCAL0, SyslogAppenderBase.facilityStringToint("LOCAL0")); assertEquals(SyslogConstants.LOG_LOCAL1, SyslogAppenderBase.facilityStringToint("LOCAL1")); assertEquals(SyslogConstants.LOG_LOCAL2, SyslogAppenderBase.facilityStringToint("LOCAL2")); assertEquals(SyslogConstants.LOG_LOCAL3, SyslogAppenderBase.facilityStringToint("LOCAL3")); assertEquals(SyslogConstants.LOG_LOCAL4, SyslogAppenderBase.facilityStringToint("LOCAL4")); assertEquals(SyslogConstants.LOG_LOCAL5, SyslogAppenderBase.facilityStringToint("LOCAL5")); assertEquals(SyslogConstants.LOG_LOCAL6, SyslogAppenderBase.facilityStringToint("LOCAL6")); assertEquals(SyslogConstants.LOG_LOCAL7, SyslogAppenderBase.facilityStringToint("LOCAL7")); }
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"); } }
SyslogAppenderBase extends AppenderBase<E> { 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"); } } }
SyslogAppenderBase extends AppenderBase<E> { 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"); } }  }
SyslogAppenderBase extends AppenderBase<E> { 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"); } }  void start(); abstract SyslogOutputStream createOutputStream(); abstract Layout<E> buildLayout(); abstract int getSeverityForEvent(Object eventObject); static int facilityStringToint(String facilityStr); String getSyslogHost(); void setSyslogHost(String syslogHost); String getFacility(); void setFacility(String facilityStr); int getPort(); void setPort(int port); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); Layout<E> getLayout(); void setLayout(Layout<E> layout); boolean getLazy(); void setLazy(boolean enable); @Override void stop(); String getSuffixPattern(); void setSuffixPattern(String suffixPattern); Charset getCharset(); void setCharset(Charset charset); }
SyslogAppenderBase extends AppenderBase<E> { 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"); } }  void start(); abstract SyslogOutputStream createOutputStream(); abstract Layout<E> buildLayout(); abstract int getSeverityForEvent(Object eventObject); static int facilityStringToint(String facilityStr); String getSyslogHost(); void setSyslogHost(String syslogHost); String getFacility(); void setFacility(String facilityStr); int getPort(); void setPort(int port); int getMaxMessageSize(); void setMaxMessageSize(int maxMessageSize); Layout<E> getLayout(); void setLayout(Layout<E> layout); boolean getLazy(); void setLazy(boolean enable); @Override void stop(); String getSuffixPattern(); void setSuffixPattern(String suffixPattern); Charset getCharset(); void setCharset(Charset charset);  }