Class SpotifyInternalAppender

  • All Implemented Interfaces:
    ch.qos.logback.core.Appender<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<ch.qos.logback.classic.spi.ILoggingEvent>, ch.qos.logback.core.spi.LifeCycle

    public class SpotifyInternalAppender
    extends MillisecondPrecisionSyslogAppender
    A 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).
    • Field Summary

      • Fields inherited from class ch.qos.logback.classic.net.SyslogAppender

        DEFAULT_STACKTRACE_PATTERN, DEFAULT_SUFFIX_PATTERN
      • Fields inherited from class ch.qos.logback.core.net.SyslogAppenderBase

        suffixPattern
      • Fields inherited from class ch.qos.logback.core.AppenderBase

        name, started
      • Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase

        context
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setPort​(int port)  
      void setReplaceNewLines​(LoggingConfigurator.ReplaceNewLines replaceNewLines)  
      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()  
      • Methods inherited from class ch.qos.logback.classic.net.SyslogAppender

        createOutputStream, getSeverityForEvent, getStackTracePattern, isThrowableExcluded, setStackTracePattern, setThrowableExcluded
      • Methods inherited from class ch.qos.logback.core.net.SyslogAppenderBase

        facilityStringToint, getFacility, getLayout, getMaxMessageSize, getPort, getSuffixPattern, getSyslogHost, setFacility, setLayout, setMaxMessageSize, setSuffixPattern, setSyslogHost, stop
      • Methods inherited from class ch.qos.logback.core.AppenderBase

        addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, toString
      • Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase

        addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
      • Methods inherited from interface ch.qos.logback.core.spi.ContextAware

        addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
    • Constructor Detail

      • SpotifyInternalAppender

        public SpotifyInternalAppender()
    • Method Detail

      • setPort

        public void setPort​(int port)
        Overrides:
        setPort in class ch.qos.logback.core.net.SyslogAppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
      • setServiceName

        public 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}).
        Parameters:
        serviceName - the service name