use of ch.qos.logback.classic.net.SyslogAppender in project qpid-broker-j by apache.
the class BrokerSyslogLoggerImpl method createAppenderInstance.
@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;
}
use of ch.qos.logback.classic.net.SyslogAppender in project qpid-broker-j by apache.
the class VirtualHostSyslogLoggerImpl method createAppenderInstance.
@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;
}
use of ch.qos.logback.classic.net.SyslogAppender in project dropwizard by dropwizard.
the class SyslogAppenderFactoryTest method patternIncludesAppNameAndPid.
@Test
public void patternIncludesAppNameAndPid() throws Exception {
final AsyncAppender wrapper = (AsyncAppender) new SyslogAppenderFactory().build(new LoggerContext(), "MyApplication", new DropwizardLayoutFactory(), new NullLevelFilterFactory<>(), new AsyncLoggingEventAppenderFactory());
assertThat(((SyslogAppender) wrapper.getAppender("syslog-appender")).getSuffixPattern()).matches("^MyApplication\\[\\d+\\].+");
}
Aggregations