public final class KibanaLogFields
extends java.lang.Object
Log lines for Kibana will contain all fields set, until the log fields are cleared by invoking clear()
.
Modifier and Type | Method and Description |
---|---|
static void |
clear()
Removes all values set for all fields.
|
static java.lang.String |
get(KibanaLogField field)
Retrieves the value for the
field . |
static KibanaLogContext |
getContext()
Create a new log context for the current thread's kibana log fields.
|
static java.lang.String |
getOrDefault(KibanaLogField field,
java.lang.String defaultValue)
Retrieves the value for the
field . |
static java.lang.String |
getValuesAsLogString()
Getter for the log string.
|
static void |
populateFromContext(KibanaLogContext logContext)
Update log fields based on the
KibanaLogContext . |
static void |
set(KibanaLogField field,
int value)
Sets the Kibana log field
field to the value . |
static void |
set(KibanaLogField field,
java.lang.String value)
Sets the Kibana log field
field to the value . |
static void |
setCallResult(KibanaLogCallResultTypes value)
Set the field KibanaLogTypeNames.LOG_TYPE to the given
value . |
static void |
setLogType(KibanaLogTypeNames value)
Set the field KibanaLogTypeNames.LOG_TYPE to the given
value . |
static void |
unset(KibanaLogField field)
Removes the value for the field
field . |
static void |
unsetLogType()
Removes the value for the field KibanaLogTypeNames.LOG_TYPE.
|
public static void setLogType(KibanaLogTypeNames value)
value
.public static void setCallResult(KibanaLogCallResultTypes value)
value
.public static void unsetLogType()
public static void set(KibanaLogField field, int value)
field
to the value
.public static void set(KibanaLogField field, java.lang.String value)
field
to the value
.public static java.lang.String get(KibanaLogField field)
field
. It will return null
if no value is set.public static java.lang.String getOrDefault(KibanaLogField field, java.lang.String defaultValue)
field
. It will return defaultValue
if no value is set.public static void unset(KibanaLogField field)
field
.public static void clear()
public static java.lang.String getValuesAsLogString()
public static void populateFromContext(KibanaLogContext logContext)
KibanaLogContext
.
See getContext()
.
public static KibanaLogContext getContext()