Close a writer without throwing execptions. If the closing of the
writer throws an exception, the exception is logged.
Parameters: writer - the writer to close. Parameters: role - the role of the writer. Parameters: log - the log to which to log a messge if closing the writerthrows an exception.