def write(self, dictionary, serializer=None):
        dictionary = dictionary.copy()
        try:
            if serializer is not None:
                serializer.serialize(dictionary)
        except:
            writeTraceback(self)
            msg = Message({MESSAGE_TYPE_FIELD: "eliot:serialization_failure",
                           "message": self._safeUnicodeDictionary(dictionary)})
            msg.write(self)
            return

        try:
            self._destinations.send(dictionary)
        except _DestinationsSendError as e:
            for (exc_type, exception, exc_traceback) in e.errors:
                try:
                    # Can't use same code path as serialization errors because
                    # if destination continues to error out we will get
                    # infinite recursion. So instead we have to manually
                    # construct a message.
                    msg = Message({
                        MESSAGE_TYPE_FIELD: "eliot:destination_failure",
                        REASON_FIELD: safeunicode(exception),
                        EXCEPTION_FIELD:
                        exc_type.__module__ + "." + exc_type.__name__,
                        "message": self._safeUnicodeDictionary(dictionary)})
                    self._destinations.send(dict(msg._freeze()))
                except:
                    # Nothing we can do here, raising exception to caller will
                    # break business logic, better to have that continue to
                    # work even if logging isn't.
                    pass
Serialize the dictionary, and write it to C{self._destinations}.
dataset/ETHPy150Open ClusterHQ/eliot/eliot/_output.py/Logger.write