public class TinyLoki
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TinyLoki.Settings
Configuration used to create a new
LogController object. |
| Constructor and Description |
|---|
TinyLoki() |
| Modifier and Type | Method and Description |
|---|---|
static LogController |
createAndStart(java.lang.String url,
java.lang.String user,
java.lang.String pass)
Deprecated.
Use
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url).withBasicAuth(user, pass).start();
|
static LogController |
createAndStart(java.lang.String url,
java.lang.String user,
java.lang.String pass,
ILogCollector logCollector,
ILogMonitor logMonitor)
Deprecated.
Use
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withLogCollector(logCollector)
.withLogMonitor(logMonitor)
.start();
|
static LogController |
createAndStart(java.lang.String url,
java.lang.String user,
java.lang.String pass,
int connectTimeout)
Deprecated.
Use
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withConnectTimeout(connectTimeout)
.start();
|
static LogController |
createAndStart(java.lang.String url,
java.lang.String user,
java.lang.String pass,
int connectTimeout,
ILogCollector logCollector,
ILogMonitor logMonitor)
Deprecated.
Use
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withConnectTimeout(connectTimeout)
.withLogCollector(logCollector)
.withLogMonitor(logMonitor)
.start();
|
static LogController |
createAndStart(TinyLoki.Settings settings)
Creates a new
LogController with given TinyLoki.Settings. |
static Labels |
critical()
|
static Labels |
debug()
|
static Labels |
fatal()
|
static Labels |
info()
|
static Labels |
l(Labels other)
Create a deep copy of given labels.
|
static Labels |
l(java.util.Map<java.lang.String,java.lang.String> map)
Create labels from mapping.
|
static Labels |
l(java.lang.String labelName,
java.lang.String labelValue)
Initialize a
Labels with predefined first label name-value. |
static Labels |
trace()
|
static Labels |
unknown()
|
static Labels |
verbose()
|
static Labels |
warning()
|
static TinyLoki.Settings |
withUrl(java.lang.String url)
Creates a new
TinyLoki.Settings object which is used to initialize a new LogController instance, e.g: |
public static TinyLoki.Settings withUrl(java.lang.String url)
TinyLoki.Settings object which is used to initialize a new LogController instance, e.g:
LogController logController =
TinyLoki.withUrl(url) // Settings created here.
.withBasicAuth(user, pass)
.withConnectTimeout(connectTimeout)
.withLogCollector(logCollector)
.withLogMonitor(logMonitor)
.start(); // LogController created here.
url - URL to Loki HTTP API endpoint, usually ending with /loki/api/v1/push.TinyLoki.Settings object, initialized with given url.public static LogController createAndStart(TinyLoki.Settings settings)
LogController with given TinyLoki.Settings.settings - Configuration of a newly created LogController.LogController.public static LogController createAndStart(java.lang.String url, java.lang.String user, java.lang.String pass)
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url).withBasicAuth(user, pass).start();
url - URL to Loki HTTP API endpoint, usually ending with /loki/api/v1/push.user - Basic authentication user. If null, BA header will not be sent.pass - Basic authentication password. If null, BA header will not be sent.LogController object.public static LogController createAndStart(java.lang.String url, java.lang.String user, java.lang.String pass, int connectTimeout)
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withConnectTimeout(connectTimeout)
.start();
url - URL to Loki HTTP API endpoint, usually ending with /loki/api/v1/push.user - Basic authentication user. If null, BA header will not be sent.pass - Basic authentication password. If null, BA header will not be sent.connectTimeout - HTTP log server connection timeout in milliseconds.LogController object.public static LogController createAndStart(java.lang.String url, java.lang.String user, java.lang.String pass, ILogCollector logCollector, ILogMonitor logMonitor)
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withLogCollector(logCollector)
.withLogMonitor(logMonitor)
.start();
url - URL to Loki HTTP API endpoint, usually ending with /loki/api/v1/push.user - Basic authentication user. If null, BA header will not be sent.pass - Basic authentication password. If null, BA header will not be sent.logCollector - ILogCollector instance.logMonitor - ILogMonitor instance.LogController object.public static LogController createAndStart(java.lang.String url, java.lang.String user, java.lang.String pass, int connectTimeout, ILogCollector logCollector, ILogMonitor logMonitor)
withUrl(String) to initialize settings and finally call TinyLoki.Settings.start(), e.g:
TinyLoki.withUrl(url)
.withBasicAuth(user, pass)
.withConnectTimeout(connectTimeout)
.withLogCollector(logCollector)
.withLogMonitor(logMonitor)
.start();
url - URL to Loki HTTP API endpoint, usually ending with /loki/api/v1/push.user - Basic authentication user. If null, BA header will not be sent.pass - Basic authentication password. If null, BA header will not be sent.connectTimeout - HTTP log server connection timeout in milliseconds.logCollector - ILogCollector instance.logMonitor - ILogMonitor instance.LogController object.public static Labels l(java.lang.String labelName, java.lang.String labelValue)
Labels with predefined first label name-value. Use Labels.l() to
append next values.labelName - Label name.labelValue - Label value.public static Labels l(java.util.Map<java.lang.String,java.lang.String> map)
map - Map containing label names and label values.public static Labels l(Labels other)
other - Other labels instance.public static Labels critical()
Labels with label level set to Labels.FATAL.
The same as fatal().
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.FATALpublic static Labels fatal()
Labels with label level set to Labels.FATAL.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.FATALpublic static Labels warning()
Labels with label level set to Labels.WARN.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.WARNpublic static Labels info()
Labels with label level set to Labels.INFO.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.INFOpublic static Labels debug()
Labels with label level set to Labels.DEBUG.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.DEBUGpublic static Labels verbose()
Labels with label level set to Labels.VERBOSE.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.VERBOSEpublic static Labels trace()
Labels with label level set to Labels.TRACE.
The same as verbose()
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.TRACE,
Labels.VERBOSEpublic static Labels unknown()
Labels with label level set to Labels.UNKNOWN.
Only one level may be assigned to single log stream. Setting other level will override previous value.
Labels.LEVEL,
Labels.UNKNOWN