def jsonify(self, record):
        timestamp = datetime.utcfromtimestamp(record.created)
        timestamp = timestamp.isoformat()

        fields = {
            'level': record.levelname,
            'filename': record.pathname,
            'lineno': record.lineno,
            'method': record.funcName,
        }
        if record.exc_info:
            fields['exception'] = str(record.exc_info)
            fields['traceback'] = format_exc(record.exc_info)

        log = {
            '@source_host': self.hostname,
            '@timestamp': timestamp,
            '@tags': [record.name],
            '@message': record.getMessage(),
            '@fields': fields,
        }
        return json.dumps(log)
Retrieve the recent history of spot instances pricing.
dataset/ETHPy150Open uber/clay/clay/logger.py/TCPHandler.jsonify--crossover with--dataset/ETHPy150Open darcyliu/storyboard/boto/ec2/connection.py/EC2Connection.get_spot_price_history