Class AutoCloseableKibanaLogField
- java.lang.Object
-
- org.hawaiiframework.logging.model.AutoCloseableKibanaLogField
-
- All Implemented Interfaces:
AutoCloseable
,KibanaLogField
public class AutoCloseableKibanaLogField extends Object implements KibanaLogField, AutoCloseable
A wrapper around a KibanaLogField where the field is closeable.Closing the field will remove the field (and it's value) from the KibanaLogFields, so further logging will not be marked with the field.
-
-
Constructor Summary
Constructors Constructor Description AutoCloseableKibanaLogField(KibanaLogField delegate)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
String
getLogName()
Get the name with which this field will appear in the log.boolean
matches(String key)
Check if a key matches.
-
-
-
Constructor Detail
-
AutoCloseableKibanaLogField
public AutoCloseableKibanaLogField(KibanaLogField delegate)
The constructor.- Parameters:
delegate
- The delegate log field to close.
-
-
Method Detail
-
getLogName
public String getLogName()
Description copied from interface:KibanaLogField
Get the name with which this field will appear in the log.- Specified by:
getLogName
in interfaceKibanaLogField
- Returns:
- the log name of the field
-
matches
public boolean matches(String key)
Description copied from interface:KibanaLogField
Check if a key matches.- Specified by:
matches
in interfaceKibanaLogField
- Parameters:
key
- the key to match- Returns:
- true if not null and if the supplied key equals this key.
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
-
-