Called when an error should be logged.
The message associated with the error.
The error that occurred.