def _ls_task_syslogs( self, application_id=None, job_id=None, output_dir=None): """Yield task log matches, logging a message for each one.""" for match in _ls_task_syslogs( self.fs, self._stream_task_log_dirs( application_id=application_id, output_dir=output_dir), application_id=application_id, job_id=job_id): log.info(' Parsing task syslog: %s' % match['path']) yield match
def ls_task_syslogs(): # there should be at most one history log for match in _ls_task_syslogs( self.fs, stream_task_log_dirs(), application_id=application_id, job_id=job_id): # TODO: this isn't really correct because # _interpret_task_logs() sorts the logs paths and # scans starting at the most recent one. Probably # should have _ls_task_syslogs() do the sorting. log.info(' Scanning for errors: %s' % match['path']) yield match
def ls_task_syslogs(): # there should be at most one history log for match in _ls_task_syslogs(self.fs, stream_task_log_dirs(), application_id=application_id, job_id=job_id): # TODO: this isn't really correct because # _interpret_task_logs() sorts the logs paths and # scans starting at the most recent one. Probably # should have _ls_task_syslogs() do the sorting. log.info(' Scanning for errors: %s' % match['path']) yield match
def mock_path_matches(self): mock_log_dir_stream = [['']] # needed to make _ls_logs() work return _ls_task_syslogs(self.mock_fs, mock_log_dir_stream)
def mock_path_matches(self): mock_log_dir_stream = [['MOCK_LOG_DIR']] # _ls_logs() needs this return _ls_task_syslogs(self.mock_fs, mock_log_dir_stream)