'Split the Eliot logs out of a Twisted log.
:param detailed: Object with ``getDetails`` where the original Twisted
logs are stored.
:param detail_name: Name of the Twisted log detail.'

def _fix_twisted_logs(self, detailed, detail_name):

    twisted_log = detailed.getDetails()[detail_name]
    split_logs = [None]
    def _get_split_logs():
        if (split_logs[0] is None):
            split_logs[0] = _split_map_maybe(extract_eliot_from_twisted_log, _iter_content_lines(twisted_log))
        return split_logs[0]
    detailed.addDetail(detail_name, Content(UTF8_TEXT, (lambda : _get_split_logs()[0])))
    detailed.addDetail(self._ELIOT_LOG_DETAIL_NAME, Content(UTF8_TEXT, (lambda : _prettyformat_lines(_get_split_logs()[1]))))
