Class AbstractElasticsearchAppender<T>

java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.UnsynchronizedAppenderBase<T>
com.agido.logback.elasticsearch.AbstractElasticsearchAppender<T>
All Implemented Interfaces:
ch.qos.logback.core.Appender<T>, ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.FilterAttachable<T>, ch.qos.logback.core.spi.LifeCycle
Direct Known Subclasses:
ElasticsearchAccessAppender, ElasticsearchAppender

public abstract class AbstractElasticsearchAppender<T> extends ch.qos.logback.core.UnsynchronizedAppenderBase<T>
  • Field Details

  • Constructor Details

    • AbstractElasticsearchAppender

      public AbstractElasticsearchAppender()
    • AbstractElasticsearchAppender

      public AbstractElasticsearchAppender(Settings settings)
  • Method Details

    • start

      public void start()
      Specified by:
      start in interface ch.qos.logback.core.spi.LifeCycle
      Overrides:
      start in class ch.qos.logback.core.UnsynchronizedAppenderBase<T>
    • publishEvent

      protected void publishEvent(T eventObject)
    • getErrorReporter

      protected ErrorReporter getErrorReporter()
    • buildElasticsearchPublisher

      protected abstract AbstractElasticsearchPublisher<T> buildElasticsearchPublisher() throws IOException
      Throws:
      IOException
    • stop

      public void stop()
      Specified by:
      stop in interface ch.qos.logback.core.spi.LifeCycle
      Overrides:
      stop in class ch.qos.logback.core.UnsynchronizedAppenderBase<T>
    • append

      protected void append(T eventObject)
      Specified by:
      append in class ch.qos.logback.core.UnsynchronizedAppenderBase<T>
    • appendInternal

      protected abstract void appendInternal(T eventObject)
    • setProperties

      public void setProperties(ElasticsearchProperties elasticsearchProperties)
    • setSleepTime

      public void setSleepTime(int sleepTime)
    • setMaxRetries

      public void setMaxRetries(int maxRetries)
    • setConnectTimeout

      public void setConnectTimeout(int connectTimeout)
    • setReadTimeout

      public void setReadTimeout(int readTimeout)
    • setIncludeCallerData

      public void setIncludeCallerData(boolean includeCallerData)
    • setErrorsToStderr

      public void setErrorsToStderr(boolean errorsToStderr)
    • setLogsToStderr

      public void setLogsToStderr(boolean logsToStderr)
    • setMaxQueueSize

      public void setMaxQueueSize(int maxQueueSize)
    • setIndex

      public void setIndex(String index)
    • setType

      public void setType(String type)
    • setUrl

      public void setUrl(String url) throws MalformedURLException
      Throws:
      MalformedURLException
    • setLoggerName

      public void setLoggerName(String logger)
    • setErrorLoggerName

      public void setErrorLoggerName(String logger)
    • setHeaders

      public void setHeaders(HttpRequestHeaders httpRequestHeaders)
    • setRawJsonMessage

      public void setRawJsonMessage(boolean rawJsonMessage)
    • setTimestampFormat

      public void setTimestampFormat(String timestampFormat)
    • setIncludeMdc

      public void setIncludeMdc(boolean includeMdc)
    • setAuthentication

      public void setAuthentication(Authentication auth)
    • setMaxMessageSize

      public void setMaxMessageSize(int maxMessageSize)
    • setKeyPrefix

      public void setKeyPrefix(String keyPrefix)
    • setObjectSerialization

      public void setObjectSerialization(boolean objectSerialization)
    • setAutoStackTraceLevel

      public void setAutoStackTraceLevel(String level)
    • setOperation

      public void setOperation(String operation)