Java 类ch.qos.logback.classic.net.SyslogAppender 实例源码

项目:bither-desktop-java    文件:LogbackFactory.java   
public static SyslogAppender buildSyslogAppender(LoggingConfiguration.SyslogConfiguration syslog,
                                                 LoggerContext context,
                                                 String name,
                                                 String logFormat) {
    final SyslogAppender appender = new SyslogAppender();
    appender.setName(name);
    appender.setContext(context);
    appender.setSyslogHost(syslog.getHost());
    appender.setFacility(syslog.getFacility().toString());
    addThresholdFilter(appender, syslog.getThreshold());

    if (logFormat != null) {
        appender.setSuffixPattern(logFormat);
    }

    appender.start();

    return appender;
}
项目:bither-desktop-java    文件:LogbackFactory.java   
public static SyslogAppender buildSyslogAppender(LoggingConfiguration.SyslogConfiguration syslog,
                                                 LoggerContext context,
                                                 String name,
                                                 String logFormat) {
    final SyslogAppender appender = new SyslogAppender();
    appender.setName(name);
    appender.setContext(context);
    appender.setSyslogHost(syslog.getHost());
    appender.setFacility(syslog.getFacility().toString());
    addThresholdFilter(appender, syslog.getThreshold());

    if (logFormat != null) {
        appender.setSuffixPattern(logFormat);
    }

    appender.start();

    return appender;
}
项目:DigitalMediaServer    文件:LoggingTest.java   
private static boolean syslogAppenderFound(Iterator<Appender<ILoggingEvent>> iterator) {
    while (iterator.hasNext()) {
        Appender<ILoggingEvent> appender = iterator.next();
        if (appender instanceof SyslogAppender) {
            return true;
        }
    }

    return false;
}