Constructor for LogItem.
Attributes are added in the following order:
message
, level
, timestamp
)The parameters for the LogItem.
Add attributes to the log item.
The attributes to add to the log item.
Get the attributes of the log item.
Prepare the log item for printing.
This operation removes empty keys from the log item, see removeEmptyKeys() for more information.
Remove empty keys from the log item, where empty keys are defined as keys with
values of undefined
, empty strings (''
), or null
.
The attributes to remove empty keys from.
Replace the attributes of the log item.
The attributes to set for the log item.
LogItem is a class that holds the attributes of a log item.
It is used by LogFormatter to store the attributes of a log item and to add additional attributes to it.