Logs an error message.
Optional throwable associated with the message.
A function providing the message to be logged.