Interface LoggerFieldsBuilder
A type used to construct a LoggerFields
instance.
public interface LoggerFieldsBuilder
extends LoggerFields
All Superinterfaces
LoggerFields
Methods
with
LoggerFieldsBuilder with(@NonNull String field, double value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, float value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, boolean value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, long value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, int value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, short value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, byte value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, char value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. Will be converted to a string. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, @NonNull Throwable value)
Add a new field. Will overwrite existing fields.
The error will be written to the field with an additional field for the stacktrace. Additionally the cause of the exception will also be recorded.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. |
Returns
A value you can chain calls with.
with
LoggerFieldsBuilder with(@NonNull String field, @NonNull String value)
Add a new field. Will overwrite existing fields.
Parameters
Name | Description |
---|---|
field | The name of the field. |
value | The value of the field. |
Returns
A value you can chain calls with.