public class LogzioSender extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
LogzioSender.Builder |
| Modifier and Type | Method and Description |
|---|---|
static LogzioSender.Builder |
builder() |
void |
drainQueueAndSend() |
static LogzioSender |
getOrCreateSenderByType(String logzioToken,
String logzioType,
int drainTimeout,
int fsPercentThreshold,
File queueDir,
String logzioUrl,
int socketTimeout,
int connectTimeout,
boolean debug,
SenderStatusReporter reporter,
ScheduledExecutorService tasksExecutor,
int gcPersistedQueueFilesIntervalSeconds)
Deprecated.
use
builder() instead. |
static LogzioSender |
getOrCreateSenderByType(String logzioToken,
String logzioType,
int drainTimeout,
int fsPercentThreshold,
File queueDir,
String logzioUrl,
int socketTimeout,
int connectTimeout,
boolean debug,
SenderStatusReporter reporter,
ScheduledExecutorService tasksExecutor,
int gcPersistedQueueFilesIntervalSeconds,
boolean compressRequests)
Deprecated.
use
builder() instead. |
void |
send(byte[] jsonStringAsUTF8ByteArray)
Send byte array to Logz.io
This method is not the recommended method to use
since it is up to the user to supply with a valid UTF8 json byte array
representation.
|
void |
send(com.google.gson.JsonObject jsonMessage) |
void |
start() |
void |
stop() |
@Deprecated public static LogzioSender getOrCreateSenderByType(String logzioToken, String logzioType, int drainTimeout, int fsPercentThreshold, File queueDir, String logzioUrl, int socketTimeout, int connectTimeout, boolean debug, SenderStatusReporter reporter, ScheduledExecutorService tasksExecutor, int gcPersistedQueueFilesIntervalSeconds, boolean compressRequests) throws LogzioParameterErrorException
builder() instead.logzioToken - your logz.io tokenlogzioType - your logz.io log typedrainTimeout - how long between sending a new bulk of logsfsPercentThreshold - FS percent threshold for the queue that uses the diskqueueDir - queue FilelogzioUrl - your logz.io urlsocketTimeout - socket timeoutconnectTimeout - connect timeoutdebug - set true if debug prints are neededreporter - reporter for logging messagestasksExecutor - thread pool for the different scheduled tasksgcPersistedQueueFilesIntervalSeconds - interval for cleaning shipped logs from the diskcompressRequests - set true if https send compressed payloadLogzioParameterErrorException@Deprecated public static LogzioSender getOrCreateSenderByType(String logzioToken, String logzioType, int drainTimeout, int fsPercentThreshold, File queueDir, String logzioUrl, int socketTimeout, int connectTimeout, boolean debug, SenderStatusReporter reporter, ScheduledExecutorService tasksExecutor, int gcPersistedQueueFilesIntervalSeconds) throws LogzioParameterErrorException
builder() instead.logzioToken - your logz.io tokenlogzioType - your logz.io log typedrainTimeout - how long between sending a new bulk of logsfsPercentThreshold - FS percent threshold for the queue that uses the diskqueueDir - queue FilelogzioUrl - your logz.io urlsocketTimeout - socket timeoutconnectTimeout - connect timeoutdebug - set true if debug prints are neededreporter - reporter for logging messagestasksExecutor - thread pool for the different scheduled tasksgcPersistedQueueFilesIntervalSeconds - interval for cleaning shipped logs from the diskLogzioParameterErrorExceptionpublic void start()
public void stop()
public void drainQueueAndSend()
public void send(com.google.gson.JsonObject jsonMessage)
public void send(byte[] jsonStringAsUTF8ByteArray)
jsonStringAsUTF8ByteArray - UTF8 byte array representation of a valid json object.public static LogzioSender.Builder builder()
Copyright © 2018. All rights reserved.