def unfold(raw_log_line):
    """Take a raw syslog line and unfold all the multiple levels of
    newline-escaping that have been inflicted on it by various things.
    Things that got python-repr()-ized, have '\n' sequences in them.
    Syslog itself looks like it uses #012.

    """
    lines = raw_log_line \
            .replace('#012', '\n') \
            .replace('\\n', '\n') \
            .splitlines()
    return lines