error
Logs an error message with optional metadata.
Parameters
message
The error message to be logged.
metadata
An array of metadata objects to be associated with the error message (optional).
Logs an error with optional metadata.
Parameters
error
The error object to be logged.
metadata
An array of metadata objects associated with the error (optional).