def prettify_log_line(line, requested_levels):
    pretty_line = ''
    try:
        parsed_line = json.loads(line)
        pretty_level = prettify_level(parsed_line['level'], requested_levels)
        pretty_line = "%(timestamp)s %(component)s %(cluster)s %(instance)s - %(level)s%(message)s" % ({
            'timestamp': prettify_timestamp(parsed_line['timestamp']),
            'component': prettify_component(parsed_line['component']),
            'cluster': '[%s]' % parsed_line['cluster'],
            'instance': '[%s]' % parsed_line['instance'],
            'level': '%s ' % pretty_level,
            'message': parsed_line['message'],
        })
    except ValueError:
        log.debug('Trouble parsing line as json. Skipping. Line: %r' % line)
        pretty_line = "Invalid JSON: %s" % line
    except KeyError:
        log.debug('JSON parsed correctly but was missing a key. Skipping. Line: %r' % line)
        pretty_line = "JSON missing keys: %s" % line
    return pretty_line


# The map of name -> LogReader subclasses, used by configure_log.
Test storing empty objects
dataset/ETHPy150Open Yelp/paasta/paasta_tools/cli/cmds/logs.py/prettify_log_line--crossover with--dataset/ETHPy150Open bradjasper/django-jsonfield/jsonfield/tests.py/JSONFieldTest.test_empty_objects