Java Code Examples for ch.qos.logback.classic.net.SyslogAppender#setSyslogHost()

The following examples show how to use ch.qos.logback.classic.net.SyslogAppender#setSyslogHost() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LogbackFactory.java    From bither-desktop-java with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example 2
Source File: LogbackFactory.java    From bither-desktop-java with Apache License 2.0 6 votes vote down vote up
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;
}
 
Example 3
Source File: VirtualHostSyslogLoggerImpl.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
protected Appender<ILoggingEvent> createAppenderInstance(Context context)
{
    SyslogAppender syslogAppender = new SyslogAppender();
    syslogAppender.setSyslogHost(_syslogHost);
    syslogAppender.setPort(_port);
    syslogAppender.setSuffixPattern(_suffixPattern);
    syslogAppender.setStackTracePattern(_stackTracePattern);
    syslogAppender.setThrowableExcluded(_throwableExcluded);
    syslogAppender.setFacility("USER");
    return syslogAppender;
}
 
Example 4
Source File: BrokerSyslogLoggerImpl.java    From qpid-broker-j with Apache License 2.0 5 votes vote down vote up
@Override
protected Appender<ILoggingEvent> createAppenderInstance(Context context)
{
    SyslogAppender syslogAppender = new SyslogAppender();
    syslogAppender.setSyslogHost(_syslogHost);
    syslogAppender.setPort(_port);
    syslogAppender.setSuffixPattern(_suffixPattern);
    syslogAppender.setStackTracePattern(_stackTracePattern);
    syslogAppender.setThrowableExcluded(_throwableExcluded);
    syslogAppender.setFacility("USER");
    return syslogAppender;
}