Package com.github.loki4j.logback
Interface HttpSender
-
- All Superinterfaces:
ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle
- All Known Implementing Classes:
AbstractHttpSender,ApacheHttpSender,JavaHttpSender
public interface HttpSender extends ch.qos.logback.core.spi.ContextAware, ch.qos.logback.core.spi.LifeCycleBasic interface that all Loki4j HTTP senders must implement. Each implementation must be annotated withNoAutoStart
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.StringgetUrl()Get Loki target URLLokiResponsesend(java.nio.ByteBuffer batch)Send a batch to LokivoidsetContentType(java.lang.String contentType)Content type of the requests to send to Loki.voidsetTenantId(java.lang.String tenantId)Tenant identifier.voidsetUrl(java.lang.String url)Set Loki target URL
-
-
-
Method Detail
-
send
LokiResponse send(java.nio.ByteBuffer batch)
Send a batch to Loki- Returns:
- A response from Loki
-
getUrl
java.lang.String getUrl()
Get Loki target URL
-
setUrl
void setUrl(java.lang.String url)
Set Loki target URL
-
setTenantId
void setTenantId(java.lang.String tenantId)
Tenant identifier. It is required only for sending logs directly to Loki operating in multi-tenant mode. Otherwise this setting has no effect
-
setContentType
void setContentType(java.lang.String contentType)
Content type of the requests to send to Loki. It depends on the encoder selected in config (JSON vs Protobuf)
-
-