public class AsyncLogger extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
LOG_LENGTH_LIMIT
Limit on individual log length ie.
|
| Constructor and Description |
|---|
AsyncLogger()
Initializes asynchronous logging.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addLineToQueue(String line)
Adds the data to internal queue to be sent over the network.
|
void |
close()
Closes all connections to Logentries.
|
boolean |
getDebug()
Returns current debug flag.
|
String |
getHostName()
Gets HostName parameter
|
boolean |
getLogHostName()
Gets value of the switch that determines whether to send HostName alongside with the log message
|
String |
getLogID()
Gets LogID parameter
|
String |
getToken()
Returns current token.
|
void |
setDebug(boolean debug)
Sets the debug flag.
|
void |
setHostName(String hostName)
Sets the HostName from configuration
|
void |
setLogHostName(boolean logHostName)
Sets value of the switch that determines whether to send HostName alongside with the log message
|
void |
setLogID(String logID)
Sets LogID parameter from config
|
void |
setToken(String token)
Sets the token
|
public static final int LOG_LENGTH_LIMIT
public void setToken(String token)
token - the logentries tokenpublic String getToken()
public void setDebug(boolean debug)
debug - debug flag to setpublic boolean getDebug()
public void setLogHostName(boolean logHostName)
logHostName - true to send hostnamepublic boolean getLogHostName()
public void setHostName(String hostName)
hostName - the hostname to setpublic String getHostName()
public void setLogID(String logID)
logID - the log idpublic String getLogID()
public void addLineToQueue(String line)
line - line to appendpublic void close()
Copyright © 2012–2017 Taimos GmbH. All rights reserved.