Display recent logs for analyses.
558664
def ls_cmd(context, before, status):
    """"""
    runs = context.obj['store'].analyses(
        status=status,
        deleted=False,
        before=parse_date(before) if before else None,
    ).limit(30)
    for run_obj in runs:
        if run_obj.status == 'pending':
            message = f"{run_obj.id} | {run_obj.family} [{run_obj.status.upper()}]"
        else:
            message = (f"{run_obj.id} | {run_obj.family} {run_obj.started_at.date()} "
                       f"[{run_obj.type.upper()}/{run_obj.status.upper()}]")
            if run_obj.status == 'running':
                message = click.style(f"{message} - {run_obj.progress * 100}/100", fg='blue')
            elif run_obj.status == 'completed':
                message = click.style(f"{message} - {run_obj.completed_at}", fg='green')
            elif run_obj.status == 'failed':
                message = click.style(message, fg='red')
        print(message)
1193289
public void displayState() {
        PrintWriter xout = context.get(Log.outKey);
        xout.println("File Object History : " +  fileObjectHistory);
        xout.println("Open Type Names     : " +  openTypeNames);
        xout.println("Gen. Src Names      : " +  generatedSourceNames);
        xout.println("Gen. Cls Names      : " +  generatedClasses.keySet());
        xout.println("Agg. Gen. Src Names : " +  aggregateGeneratedSourceNames);
        xout.println("Agg. Gen. Cls Names : " +  aggregateGeneratedClassNames);
    }
1334325
def recent(self, with_catalog=True, with_date=True):
        '''
        
        '''
        kwd = {
            'pager': '',
            'title': 'Recent posts.',
            'with_catalog': with_catalog,
            'with_date': with_date,
        }
        self.render('list/post_list.html',
                    kwd=kwd,
                    view=MPost.query_recent(num=20),
                    postrecs=MPost.query_recent(num=2),
                    format_date=tools.format_date,
                    userinfo=self.userinfo,
                    cfg=CMS_CFG, )
1332814
def log(self, level, *msg_elements):
    """"""
    self.report.log(self._threadlocal.current_workunit, level, *msg_elements)
614809
def get_logs(self, unique_id, logs, directory, pattern=constants.FILTER_NAME_ALLOW_NONE):
    """"""
    self.fetch_logs(unique_id, logs, directory, pattern)
81684
def dump_logs(job_queue='run_reach_queue', job_status='RUNNING'):
    """"""
    jobs = get_jobs(job_queue, job_status)
    for job in jobs:
        get_job_log(job, write_file=True)
1341483
public function indexAction()
  {
    try
    {
      /* query server logs */
      $this->tpl->ts3_logs = $this->ts3->logView(100);
    }
    catch(Exception $e)
    {
      /* save catched error mesage */
      $this->setLastEvent($e->getMessage(), TRUE);

      /* fallback to default values */
      $this->tpl->ts3_logs = array();
    }

    $this->assignLastEvent();
  }
299391
function logs(appName, callback) {
    commons.get(format('/%s/apps/%s/logs/', deis.version, appName), callback);
  }
393347
def display_all(self):
        
        print( ("total elapse %0.6f seconds, last elapse %0.6f seconds, "
                "took %s times measurement") % (
                    self.total_elapse, self.elapse, len(self.records)))
1025286
def recent(self):
        '''
        
        '''
        kwd = {
            'pager': '',
            'title': 'Recent Pages',
        }
        self.render('wiki_page/wiki_list.html',
                    view=MWiki.query_recent(),
                    format_date=tools.format_date,
                    kwd=kwd,
                    userinfo=self.userinfo)
274168
public function index() {
		$logs = [];
		$typesWithCount = $this->DatabaseLogs->getTypesWithCount();

		$lastErrors = $this->DatabaseLogs->find()
			->select(['summary'])
			->where(['type' => 'error'])
			->group('summary')
			->orderDesc('id')
			->limit(10)
			->disableHydration()
			->all()->toArray();

		$this->set(compact('logs', 'typesWithCount', 'lastErrors'));
	}
920480
def get_logs(self):
        
        assert BeautifulSoup, "Please install bs4 to use this method"

        url = self.base_url + "/system/syslog.lua"
        response = self.session.get(url, params={
            'sid': self.sid,
            'stylemode': 'print',
        }, timeout=15)
        response.raise_for_status()

        entries = []
        tree = BeautifulSoup(response.text)
        rows = tree.find('table').find_all('tr')
        for row in rows:
            columns = row.find_all("td")
            date = columns[0].string
            time = columns[1].string
            message = columns[2].find("a").string

            merged = "{} {} {}".format(date, time, message.encode("UTF-8"))
            msg_hash = hashlib.md5(merged).hexdigest()
            entries.append(LogEntry(date, time, message, msg_hash))
        return entries
1235020
def analyze_log(fp, configs, url_rules):
    """"""
    url_classifier = URLClassifier(url_rules)
    analyzer = LogAnalyzer(url_classifier=url_classifier, min_msecs=configs.min_msecs)
    for line in fp:
        analyzer.analyze_line(line)
    return analyzer.get_data()
49106
def log_status(plugin, filename, status):
    ''''''
    display = ':'.join((plugin, filename)) + ' '
    log.info('%s [%s]', '{:.<70}'.format(display), status)
305478
def log_analyzer(path):
    
    with handle(MalformedLogEntryError,
                  lambda (c):
                      invoke_restart('use_value',
                                     MalformedLogEntry(c.text))):
        for filename in find_all_logs(path):
            analyze_log(filename)
1234519
def cli(env):
    """"""
    mgr = SoftLayer.EventLogManager(env.client)

    event_log_types = mgr.get_event_log_types()

    table = formatting.Table(COLUMNS)

    for event_log_type in event_log_types:
        table.add_row([event_log_type])

    env.fout(table)
736279
def ShowInfo(self):
    """"""
    self._output_writer.Write(
        '{0:=^80s}\n'.format(' log2timeline/plaso information '))

    plugin_list = self._GetPluginData()
    for header, data in plugin_list.items():
      table_view = views.ViewsFactory.GetTableView(
          self._views_format_type, column_names=['Name', 'Description'],
          title=header)
      for entry_header, entry_data in sorted(data):
        table_view.AddRow([entry_header, entry_data])
      table_view.Write(self._output_writer)