public class LogentriesAppender
extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_SUFFIX_PATTERN
Default Suffix Pattern
|
| Constructor and Description |
|---|
LogentriesAppender()
Creates a new Logentries appender.
|
LogentriesAppender(AsyncLogger logger)
Creates a new Logentries appender.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
append(ch.qos.logback.classic.spi.ILoggingEvent event)
Implements AppenderSkeleton Append method, handles time and format
|
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> |
buildLayout() |
java.lang.String |
getFacility()
Returns the string value of the Facility option.
|
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> |
getLayout() |
java.lang.String |
getSuffixPattern()
See {@link #setSuffixPattern(String).
|
void |
setDebug(boolean debug)
Sets the debug flag.
|
void |
setEncoder(ch.qos.logback.classic.encoder.PatternLayoutEncoder encoder)
Sets the suffixPattern to be the
|
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 |
setHttpPut(boolean HttpPut)
Sets the HTTP PUTflag.
|
void |
setKey(java.lang.String account_key)
Sets the ACCOUNT KEY value for HTTP PUT.
|
void |
setLayout(ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> layout)
Sets the layout for the Appender
|
void |
setLocation(java.lang.String log_location)
Sets the LOCATION value for HTTP PUT.
|
void |
setSsl(boolean ssl)
Sets the SSL boolean flag
|
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 |
setToken(java.lang.String token)
Sets the token.
|
void |
start() |
void |
stop()
Closes all connections to Logentries
|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final java.lang.String DEFAULT_SUFFIX_PATTERN
public LogentriesAppender()
public LogentriesAppender(AsyncLogger logger)
Used for unit testing.
logger - the AsyncLogger to dispatch eventspublic void setToken(java.lang.String token)
token - public void setHttpPut(boolean HttpPut)
Send logs via HTTP PUT instead of default Token TCP.
httpput - true to use HTTP PUT APIpublic void setKey(java.lang.String account_key)
account_key - public void setLocation(java.lang.String log_location)
log_location - public void setSsl(boolean ssl)
ssl - public void setDebug(boolean debug)
Appender in debug mode will print error messages on error console.
debug - debug flag to setpublic void setEncoder(ch.qos.logback.classic.encoder.PatternLayoutEncoder encoder)
encoder - public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>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 void setLayout(ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> layout)
public ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> getLayout()
protected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>public void stop()
stop in interface ch.qos.logback.core.spi.LifeCyclestop in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>public ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent> buildLayout()
public java.lang.String getSuffixPattern()
public void setSuffixPattern(java.lang.String suffixPattern)
suffixPattern - Copyright © 2014. All Rights Reserved.