public class SpotifyInternalAppender extends MillisecondPrecisionSyslogAppender
SyslogAppender that uses millisecond precision, and that by default configures its
values for SyslogAppenderBase.syslogHost and SyslogAppenderBase.port based on the
environment variables specified in LoggingConfigurator.SPOTIFY_SYSLOG_HOST and
LoggingConfigurator.SPOTIFY_SYSLOG_PORT. If the configuration explicitly sets the
SyslogAppenderBase.syslogHost or SyslogAppenderBase.port values, the environment
variables will not be used. Note that logback's configuration support allows you to use
environment variables in your logback.xml file as well (see
http://logback.qos.ch/manual/configuration.html#scopes).| Modifier and Type | Field and Description |
|---|---|
private boolean |
portConfigured |
private String |
serviceName |
stackTraceLayout| Constructor and Description |
|---|
SpotifyInternalAppender() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkSetPort(String environmentValue) |
(package private) static String |
getMyPid() |
void |
setPort(int port) |
void |
setServiceName(String serviceName)
The service name you want to include in the logs - this is a mandatory setting, and determines
where syslog-ng will send the log output (/spotify/log/${serviceName}).
|
void |
start() |
append, buildLayout, getCharset, getPrefixPattern, postProcess, setCharsetgetSeverityForEvent, getStackTracePattern, isThrowableExcluded, setStackTracePattern, setThrowableExcludedfacilityStringToint, getFacility, getLayout, getMaxMessageSize, getPort, getSuffixPattern, getSyslogHost, setFacility, setLayout, setMaxMessageSize, setSuffixPattern, setSyslogHost, stopaddFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextprivate String serviceName
private boolean portConfigured
public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class MillisecondPrecisionSyslogAppenderprivate void checkSetPort(String environmentValue)
public void setPort(int port)
setPort in class ch.qos.logback.core.net.SyslogAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>public void setServiceName(String serviceName)
serviceName - the service namestatic String getMyPid()
Copyright © 2016. All Rights Reserved.