Package com.github.loki4j.logback
Class JavaHttpSender
- java.lang.Object
-
- ch.qos.logback.core.spi.ContextAwareBase
-
- com.github.loki4j.logback.AbstractHttpSender
-
- com.github.loki4j.logback.JavaHttpSender
-
- All Implemented Interfaces:
ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle,HttpSender
public class JavaHttpSender extends AbstractHttpSender
Loki sender that is backed by Java standardHttpClient
-
-
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 JavaHttpSender()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description LokiResponsesend(java.nio.ByteBuffer batch)Send a batch to LokivoidsetInnerThreadsExpirationMs(long innerThreadsExpirationMs)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
-
setInnerThreadsExpirationMs
public void setInnerThreadsExpirationMs(long innerThreadsExpirationMs)
-
-