Class KibanaLogFields
- java.lang.Object
-
- org.hawaiiframework.logging.model.KibanaLogFields
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclear()Removes all values set for all fields.static voidclear(KibanaLogField field)Removes the value for the fieldfield.static voidclear(KibanaLogField... fields)Removes the value for the fieldsfields.static Stringget(KibanaLogField field)Retrieves the value for thefield.static KibanaLogContextgetContext()Create a new log context for the current thread's kibana log fields.static StringgetOrDefault(KibanaLogField field, String defaultValue)Retrieves the value for thefield.static StringgetValuesAsLogString()Getter for the log string.static voidpopulateFromContext(KibanaLogContext logContext)Update log fields based on theKibanaLogContext.static KibanaLogFieldtag(KibanaLogField field, int value)Sets the Kibana log fieldfieldto thevalue.static KibanaLogFieldtag(KibanaLogField field, Enum<?> value)Sets the Kibana log fieldfieldto thevalue.static KibanaLogFieldtag(KibanaLogField field, String value)Sets the Kibana log fieldfieldto thevalue.static KibanaLogFieldtag(KibanaLogField field, Collection<String> values)Sets the Kibana log fieldfieldto thevalue.static AutoCloseableKibanaLogFieldtagCloseable(KibanaLogField field, int value)Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.static AutoCloseableKibanaLogFieldtagCloseable(KibanaLogField field, Enum<?> value)Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.static AutoCloseableKibanaLogFieldtagCloseable(KibanaLogField field, String value)Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.static AutoCloseableKibanaLogFieldtagCloseable(KibanaLogField field, Collection<String> values)Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.
-
-
-
Method Detail
-
tag
public static KibanaLogField tag(KibanaLogField field, Enum<?> value)
Sets the Kibana log fieldfieldto thevalue.
-
tag
public static KibanaLogField tag(KibanaLogField field, int value)
Sets the Kibana log fieldfieldto thevalue.
-
tag
public static KibanaLogField tag(KibanaLogField field, String value)
Sets the Kibana log fieldfieldto thevalue.
-
tag
public static KibanaLogField tag(KibanaLogField field, Collection<String> values)
Sets the Kibana log fieldfieldto thevalue.
-
tagCloseable
public static AutoCloseableKibanaLogField tagCloseable(KibanaLogField field, Enum<?> value)
Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.
-
tagCloseable
public static AutoCloseableKibanaLogField tagCloseable(KibanaLogField field, int value)
Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.
-
tagCloseable
public static AutoCloseableKibanaLogField tagCloseable(KibanaLogField field, String value)
Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.
-
tagCloseable
public static AutoCloseableKibanaLogField tagCloseable(KibanaLogField field, Collection<String> values)
Sets the Kibana log fieldfieldto thevalue, returns an auto closeable.
-
get
public static String get(KibanaLogField field)
Retrieves the value for thefield. It will returnnullif no value is set.
-
getOrDefault
public static String getOrDefault(KibanaLogField field, String defaultValue)
Retrieves the value for thefield. It will returndefaultValueif no value is set.
-
clear
public static void clear(KibanaLogField field)
Removes the value for the fieldfield.
-
clear
public static void clear(KibanaLogField... fields)
Removes the value for the fieldsfields.
-
clear
public static void clear()
Removes all values set for all fields.
-
getValuesAsLogString
public static String getValuesAsLogString()
Getter for the log string.- Returns:
- the log string
-
populateFromContext
public static void populateFromContext(KibanaLogContext logContext)
Update log fields based on theKibanaLogContext.See
getContext().
-
getContext
public static KibanaLogContext getContext()
Create a new log context for the current thread's kibana log fields.
-
-