public class SyslogAppenderFactory extends AbstractAppenderFactory
AppenderFactory implementation which provides an appender that sends events to a
syslog server.
Configuration Parameters:
| Name | Default | Description |
host |
localhost |
The hostname of the syslog server. |
port |
514 |
The port on which the syslog server is listening. |
facility |
local0 |
The syslog facility to use. Can be either auth, authpriv,
daemon, cron, ftp, lpr, kern, mail,
news, syslog, user, uucp, local0,
local1, local2, local3, local4, local5,
local6, or local7.
|
threshold |
ALL |
The lowest level of events to write to the file. |
logFormat |
the default format | The Logback pattern with which events will be formatted. See the Logback documentation for details. |
AbstractAppenderFactory| Modifier and Type | Class and Description |
|---|---|
static class |
SyslogAppenderFactory.Facility |
threshold| Constructor and Description |
|---|
SyslogAppenderFactory() |
| Modifier and Type | Method and Description |
|---|---|
ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> |
build(ch.qos.logback.classic.LoggerContext context,
String applicationName,
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> layout)
Given a Logback context, an application name, and a layout, build a new appender.
|
SyslogAppenderFactory.Facility |
getFacility() |
String |
getHost()
Returns the hostname of the syslog server.
|
boolean |
getIncludeStackTrace() |
String |
getLogFormat()
Returns the Logback pattern with which events will be formatted.
|
int |
getPort() |
String |
getStackTracePrefix() |
void |
setFacility(SyslogAppenderFactory.Facility facility) |
void |
setHost(String host) |
void |
setIncludeStackTrace(boolean includeStackTrace) |
void |
setLogFormat(String logFormat)
Sets the Logback pattern with which events will be formatted.
|
void |
setPort(int port) |
void |
setStackTracePrefix(String stackTracePrefix) |
addThresholdFilter, buildLayout, getDiscardingThreshold, getQueueSize, getThreshold, setDiscardingThreshold, setQueueSize, setThreshold, wrapAsync, wrapAsyncpublic String getLogFormat()
getLogFormat in class AbstractAppenderFactorypublic void setLogFormat(String logFormat)
setLogFormat in class AbstractAppenderFactorypublic String getHost()
public void setHost(String host)
public SyslogAppenderFactory.Facility getFacility()
public void setFacility(SyslogAppenderFactory.Facility facility)
public int getPort()
public void setPort(int port)
public boolean getIncludeStackTrace()
public void setIncludeStackTrace(boolean includeStackTrace)
public String getStackTracePrefix()
public void setStackTracePrefix(String stackTracePrefix)
public ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent> build(ch.qos.logback.classic.LoggerContext context,
String applicationName,
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> layout)
AppenderFactorycontext - the Logback contextapplicationName - the application namelayout - the layout for loggingAppenderCopyright © 2015. All rights reserved.