E
- public abstract class SyslogAppenderBase<E> extends AppenderBase<E>
Constructor and Description |
---|
SyslogAppenderBase() |
Modifier and Type | Method and Description |
---|---|
abstract Layout<E> |
buildLayout() |
abstract SyslogOutputStream |
createOutputStream() |
static int |
facilityStringToint(java.lang.String facilityStr)
Returns the integer value corresponding to the named syslog facility.
|
java.nio.charset.Charset |
getCharset()
Returns the Charset used to encode String messages into byte sequences when writing to
syslog.
|
java.lang.String |
getFacility()
Returns the string value of the Facility option.
|
Layout<E> |
getLayout() |
int |
getMaxMessageSize() |
int |
getPort() |
abstract int |
getSeverityForEvent(java.lang.Object eventObject) |
java.lang.String |
getSuffixPattern()
See {@link #setSuffixPattern(String).
|
java.lang.String |
getSyslogHost()
Returns the value of the SyslogHost option.
|
void |
setCharset(java.nio.charset.Charset charset)
The Charset to use when encoding messages into byte sequences.
|
void |
setFacility(java.lang.String facilityStr)
The Facility option must be set one of the strings KERN, USER, MAIL,
DAEMON, AUTH, SYSLOG, LPR, NEWS, UUCP, CRON, AUTHPRIV, FTP, NTP, AUDIT,
ALERT, CLOCK, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6,
LOCAL7.
|
void |
setLayout(Layout<E> layout) |
void |
setMaxMessageSize(int maxMessageSize)
Maximum size for the syslog message (in characters); messages
longer than this are truncated.
|
void |
setPort(int port)
The port number on the syslog server to connect to.
|
void |
setSuffixPattern(java.lang.String suffixPattern)
The suffixPattern option specifies the format of the
non-standardized part of the message sent to the syslog server.
|
void |
setSyslogHost(java.lang.String syslogHost)
The SyslogHost option is the name of the the syslog host where log
output should go.
|
void |
start() |
void |
stop() |
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getStatusManager, setContext
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
public void start()
start
in interface LifeCycle
start
in class AppenderBase<E>
public abstract SyslogOutputStream createOutputStream() throws java.net.UnknownHostException, java.net.SocketException
java.net.UnknownHostException
java.net.SocketException
public abstract int getSeverityForEvent(java.lang.Object eventObject)
public static int facilityStringToint(java.lang.String facilityStr)
java.lang.IllegalArgumentException
- if the facility string is not recognizedpublic java.lang.String getSyslogHost()
public void setSyslogHost(java.lang.String syslogHost)
public java.lang.String getFacility()
setFacility(java.lang.String)
for the set of allowed values.public void setFacility(java.lang.String facilityStr)
See SyslogConstants
and RFC 3164 for more information about the
Facility option.
public int getPort()
public void setPort(int port)
public int getMaxMessageSize()
public void setMaxMessageSize(int maxMessageSize)
public void stop()
stop
in interface LifeCycle
stop
in class AppenderBase<E>
public java.lang.String getSuffixPattern()
public void setSuffixPattern(java.lang.String suffixPattern)
suffixPattern
- public java.nio.charset.Charset getCharset()
public void setCharset(java.nio.charset.Charset charset)
charset
- Copyright © 2010 - 2020 Adobe. All Rights Reserved