Package com.github.loki4j.logback
Class ApacheHttpSender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- com.github.loki4j.logback.AbstractHttpSender
-
- com.github.loki4j.logback.ApacheHttpSender
-
- All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle,HttpSender
public class ApacheHttpSender extends AbstractHttpSender
Loki sender that is backed by ApacheHttpClient
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.github.loki4j.logback.AbstractHttpSender
AbstractHttpSender.BasicAuth
-
-
Field Summary
-
Fields inherited from class com.github.loki4j.logback.AbstractHttpSender
basicAuthToken, connectionTimeoutMs, contentType, requestTimeoutMs, tenantId, url
-
-
Constructor Summary
Constructors Constructor Description ApacheHttpSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LokiResponsesend(java.nio.ByteBuffer batch)Send a batch to LokivoidsetConnectionKeepAliveMs(long connectionKeepAliveMs)voidsetMaxConnections(int maxConnections)voidstart()voidstop()-
Methods inherited from class com.github.loki4j.logback.AbstractHttpSender
getUrl, isStarted, setAuth, setConnectionTimeoutMs, setContentType, setRequestTimeoutMs, setTenantId, setUrl
-
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
-
-
-
-
Method Detail
-
start
public void start()
- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
startin classAbstractHttpSender
-
stop
public void stop()
- Specified by:
stopin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
stopin classAbstractHttpSender
-
send
public LokiResponse send(java.nio.ByteBuffer batch)
Description copied from interface:HttpSenderSend a batch to Loki- Returns:
- A response from Loki
-
setMaxConnections
public void setMaxConnections(int maxConnections)
-
setConnectionKeepAliveMs
public void setConnectionKeepAliveMs(long connectionKeepAliveMs)
-
-