| 212 | return entry |
| 213 | |
| 214 | def find_log(self, execution_id): |
| 215 | self._renew_files_cache() |
| 216 | |
| 217 | file = self._ids_to_file_map.get(execution_id) |
| 218 | if file is None: |
| 219 | LOGGER.warning('find_log: file for %s id not found', execution_id) |
| 220 | return None |
| 221 | |
| 222 | file_content = file_utils.read_file(os.path.join(self._output_folder, file), |
| 223 | keep_newlines=True) |
| 224 | log = file_content.split(OUTPUT_STARTED_MARKER, 1)[1] |
| 225 | return _lstrip_any_linesep(log) |
| 226 | |
| 227 | def _extract_history_entry(self, file): |
| 228 | file_path = os.path.join(self._output_folder, file) |