def METHOD_NAME(self, record):
    """Emit a log message on my socket."""
    try:
        topic, record.msg = record.msg.split(TOPIC_DELIM,1)
    except Exception:
        topic = ""
    try:
        bmsg = cast_bytes(self.format(record))
    except Exception:
        self.handleError(record)
        return
    topic_list = []
    if self.root_topic:
        topic_list.append(self.root_topic)
    topic_list.append(record.levelname)
    if topic:
        topic_list.append(topic)
    btopic = b'.'.join(cast_bytes(t) for t in topic_list)
    self.socket.send_multipart([btopic, bmsg])