def METHOD_NAME(self, record):
    data = {
        "time": record.created,
        "name": record.name,
        "level": record.levelname,
        "message": record.getMessage(),
    }
    if record.exc_info:
        if not record.exc_text:
            record.exc_text = self.formatException(record.exc_info)
        data["exc_text"] = record.exc_text
    return json.dumps(data)