Returns log line for given issue.
178256
def issue_line(issue):
    """"""
    template = '#{number} {tags}{title}'
    tags = issue_tags(issue)
    params = {
        'title': issue['title'].capitalize().rstrip('.'),
        'number': issue['number'],
        'tags': ' '.join('[{}]'.format(tag) for tag in tags) + (' ' if tags else '')
    }
    return template.format(**params)
760866
def check_status_logfile(self, checker_func):
        """"""
        self.status = checker_func(self.logfile)
        return self.status
80300
def log(self, output, exit_status):
        """"""
        if exit_status != 0:
            self.logger.error(f'Error running command! Exit status: {exit_status}, {output}')

        return exit_status
570138
def log(self, msg, error=False):
        """"""
        output = self.stdout
        if error:
            output = self.stderr

        output.write(msg)
        output.write('\n')
1187350
def logexception(self, logger=None):
        '''
        
        '''
        traceback.print_exc()
        if logger: 
            logger.exception('Unexpected runtime Error...')
        else:
            self.logger.exception('Unexpected runtime Error...')
331486
def get_log(self, request, response):
        
        return {
            'method': request.method,
            'path': request.get_full_path(),
            'code': response.status_code,
            'time': time.time(),
        }
1119821
def log(self):
        '''
        
        '''

        log = self._log(num=10, format='%h::%b').get('stdout')
        if log:
            return [
                dict(commit=c, message=m) for c, m in [
                    l.split('::') for l in log
                ]
            ]
659354
def accept_line(self, logevent):
        """"""
        if self.regex_mode:
            return bool(re.search(self.field, logevent.line_str))
        else:
            return getattr(logevent, self.field) is not None
557966
def log_error(*error, cause=None):
    
    thread_id = threading.current_thread().ident
    text = " ".join(error)
    if cause:
        text += " due to " + str(cause)

    logger = get_logger()
    logger.error(LOG_THREAD_FORMAT.format(thread_id, text))
772171
def info(self, msg=None, *args, **kwargs):
        """"""

        return self._log(logging.INFO, msg, args, kwargs)
521210
def exception_log_and_respond(exception, logger, message, status_code):
    """"""
    logger.error(message, exc_info=True)
    return make_response(
        message,
        status_code,
        dict(exception_type=type(exception).__name__, exception_message=str(exception)),
    )
905043
def get_logs(self, jobs, log_file=None):
        """"""
        if not (jobs and self.log_url):
            return

        for job in jobs:
            url = "{}?jobId={}".format(self.log_url, job.get("id"))
            if log_file:
                self._download_log("{}&download".format(url), log_file)
            else:
                logger.info("Submit log for job %s: %s", job.get("id"), url)
711734
def log_error(self, msg, *args):
        """"""
        if self._logger is not None:
            self._logger.error(msg, *args)
        else:
            print(msg % args)
1314833
def _log(self, message, severity=Logger.DEBUG):
        
        return self.logger.log(message, severity, self.TAG)
255993
def process_log_record(self, log_record):
        """"""
        log_record["version"] = __version__
        log_record["program"] = PROGRAM_NAME
        log_record["service_name"] = log_record.pop('threadName', None)
        # return jsonlogger.JsonFormatter.process_log_record(self, log_record)

        return log_record
394812
def relevent_issue(issue, after):
    """"""
    return (closed_issue(issue, after) and
            issue_completed(issue) and
            issue_section(issue))
1165976
def log_error(self, error, message, detail=None, strip=4):
        ""
        if message:
            msg = message + ": " + error
        else:
            msg = error

        tb = traceback.format_stack()
        if sys.version_info >= (3, 0):
            tb = tb[:-strip]
        else:
            tb = tb[strip:]

        self.errors.append({
            'message': msg,
            'traceback': tb,
            'detail': detail
        })