Setup table log.
421457
protected function setup_table() {
        $filter = $this->setup_filters();
        $this->tablelog = new report_loglive_table_log('report_loglive', $filter);
        $this->tablelog->define_baseurl($this->url);
    }
392362
def setup(
            self):
        

        return self.arguments, self.settings, self.log, self.dbConn
870464
def log(self) :
		""""""
		
		self.logs['epochDuration'].append(self.lastEpochDuration)
		self.logs['avg'].append(self.avg)
		self.logs['runtime'].append(self.runtime)
		self.logs['remtime'].append(self.remtime)
1305681
def setup_logging(logging_config, debug=False):
    """"""

    if logging_config is not None:
        logging.config.fileConfig(logging_config)

    else:
        logging.basicConfig(level=debug and logging.DEBUG or logging.ERROR)
333619
def setup_logger():
    """"""
    formatter = ColoredFormatter(
        "%(log_color)s%(levelname)-8s%(reset)s %(blue)s%(message)s",
        datefmt=None,
        reset=True,
        log_colors={
            'DEBUG':    'cyan',
            'INFO':     'green',
            'WARNING':  'yellow',
            'ERROR':    'red',
            'CRITICAL': 'red',
        }
    )

    logger = logging.getLogger('example')
    handler = logging.StreamHandler()
    handler.setFormatter(formatter)
    logger.addHandler(handler)
    logger.setLevel(logging.DEBUG)

    return logger
1090213
def _storeLog(self, nick, time, uid):
        """"""
        query = dict(uid=uid)
        update = {'$set': dict(nick=nick, time=time)}
        self.db.pastes.update(query, update)
810077
protected synchronized void setup() {
		registerAttributes(logAttributeInfo, log);
		for(XTrace trace : log) {
			numberOfTraces++;
			registerAttributes(traceAttributeInfo, trace);
			XTimeBoundsImpl traceBounds = new XTimeBoundsImpl();
			for(XEvent event : trace) {
				registerAttributes(eventAttributeInfo, event);
				for(XEventClasses classes : this.eventClasses.values()) {
					classes.register(event);
				}
				traceBounds.register(event);
				numberOfEvents++;
			}
			this.traceBoundaries.put(trace, traceBounds);
			this.logBoundaries.register(traceBounds);
		}
		// harmonize event class indices
		for(XEventClasses classes : this.eventClasses.values()) {
			classes.harmonizeIndices();
		}
	}
632772
def setup_logging(format="%(asctime)s - %(levelname)s - %(message)s", level='INFO'):
    """"""
    try:
        import coloredlogs
        coloredlogs.install(fmt=format, level=level)
    except ImportError:
        logging.basicConfig(format=format, level=level)
51181
def set_table_cb(self, viewer, table):
        """"""
        self.clear()
        tree_dict = OrderedDict()

        # Extract data as astropy table
        a_tab = table.get_data()

        # Fill masked values, if applicable
        try:
            a_tab = a_tab.filled()
        except Exception:  # Just use original table
            pass

        # This is to get around table widget not sorting numbers properly
        i_fmt = '{{0:0{0}d}}'.format(len(str(len(a_tab))))

        # Table header with units
        columns = [('Row', '_DISPLAY_ROW')]
        for c in a_tab.columns.values():
            col_str = '{0:^s}\n{1:^s}'.format(c.name, str(c.unit))
            columns.append((col_str, c.name))

        self.widget.setup_table(columns, 1, '_DISPLAY_ROW')

        # Table contents
        for i, row in enumerate(a_tab, 1):
            bnch = Bunch.Bunch(zip(row.colnames, row.as_void()))
            i_str = i_fmt.format(i)
            bnch['_DISPLAY_ROW'] = i_str
            tree_dict[i_str] = bnch

        self.widget.set_tree(tree_dict)

        # Resize column widths
        n_rows = len(tree_dict)
        if n_rows < self.settings.get('max_rows_for_col_resize', 5000):
            self.widget.set_optimal_column_widths()
            self.logger.debug('Resized columns for {0} row(s)'.format(n_rows))

        tablename = table.get('name', 'NoName')
        self.logger.debug('Displayed {0}'.format(tablename))
885595
def set_up_logging(log_filename: str = "log", verbosity: int = 0) ->logging.Logger:
    """"""
    LOG.setLevel(logging.DEBUG)

    # Log everything verbosely to a file.
    file_handler = RotatingFileHandler(filename=log_filename, maxBytes=1024000000, backupCount=10)
    verbose_form = logging.Formatter(fmt="%(asctime)s - %(levelname)s - %(module)s - %(message)s")
    file_handler.setFormatter(verbose_form)
    file_handler.setLevel(logging.DEBUG)
    LOG.addHandler(file_handler)

    # Provide a stdout handler logging at INFO.
    stream_handler = logging.StreamHandler(sys.stdout)
    simple_form = logging.Formatter(fmt="%(message)s")
    stream_handler.setFormatter(simple_form)

    if verbosity > 0:
        stream_handler.setLevel(logging.DEBUG)
    else:
        stream_handler.setLevel(logging.INFO)

    LOG.addHandler(stream_handler)

    return LOG
383180
def setup_logger(logging_level, logging_format):
    """"""
    logger = logging.getLogger("ray")
    if type(logging_level) is str:
        logging_level = logging.getLevelName(logging_level.upper())
    logger.setLevel(logging_level)
    global _default_handler
    if _default_handler is None:
        _default_handler = logging.StreamHandler()
        logger.addHandler(_default_handler)
    _default_handler.setFormatter(logging.Formatter(logging_format))
    logger.propagate = False
792935
def setup_task_logging_for_db
      Config.event_log = EventLog::Log.new(TaskDBWriter.new(:event_output, @task.id))
      Config.result = TaskDBWriter.new(:result_output, @task.id)
    end
107351
def setup_logger(log_file, level=logging.DEBUG):
    ''''''
    cfg = AppBuilder.get_pcfg()
    logger = cfg['log_module']
    # todo make sure structlog is compliant and that logbook is also the correct name???
    assert logger in ("logging", "logbook", "structlog"), 'bad logger specified'
    exec("import {0};logging = {0}".format(logger))

    AppBuilder.logger = logging

    logging.basicConfig(
        filename=log_file,
        filemode='w',
        level=level,
        format='%(asctime)s:%(levelname)s: %(message)s')  # one run
    logging.debug('System is: %s' % platform.platform())
    logging.debug('Python archetecture is: %s' % platform.architecture()[0])
    logging.debug('Machine archetecture is: %s' % platform.machine())

    set_windows_permissions(log_file)
643234
def setup(self, mujoco_objects, table_top_offset, table_size):
        
        self.mujoco_objects = mujoco_objects
        self.n_obj = len(self.mujoco_objects)
        self.table_top_offset = table_top_offset
        self.table_size = table_size
693658
def setup_logging(log_level=logging.INFO):
    """"""
    logging.basicConfig(level=log_level)
    fmt = ("%(asctime)s %(levelname)s (%(threadName)s) "
           "[%(name)s] %(message)s")
    colorfmt = "%(log_color)s{}%(reset)s".format(fmt)
    datefmt = '%Y-%m-%d %H:%M:%S'

    # Suppress overly verbose logs from libraries that aren't helpful
    logging.getLogger('requests').setLevel(logging.WARNING)

    try:
        from colorlog import ColoredFormatter
        logging.getLogger().handlers[0].setFormatter(ColoredFormatter(
            colorfmt,
            datefmt=datefmt,
            reset=True,
            log_colors={
                'DEBUG': 'cyan',
                'INFO': 'green',
                'WARNING': 'yellow',
                'ERROR': 'red',
                'CRITICAL': 'red',
            }
        ))
    except ImportError:
        pass

    logger = logging.getLogger('')
    logger.setLevel(log_level)
881287
def setup_logging(self):
        """"""
        date_format = '%Y-%m-%dT%H:%M:%S'
        log_format = '%(asctime)s %(levelname)s: %(message)s'

        if self.opts.verbose:
            lvl = logging.DEBUG
        else:
            lvl = logging.INFO
            # Requests is a bit chatty
            logging.getLogger('requests').setLevel('WARNING')

        self.logger.setLevel(lvl)

        stdout = logging.StreamHandler(sys.stdout)
        stdout.setLevel(lvl)
        formatter = logging.Formatter(log_format, date_format)
        stdout.setFormatter(formatter)
        self.logger.addHandler(stdout)

        # Decided not to use stderr
        # stderr = logging.StreamHandler(sys.stderr)
        # stderr.setLevel(logging.ERROR)  # Error and above go to both stdout & stderr
        # formatter = logging.Formatter(log_format, date_format)
        # stderr.setFormatter(formatter)
        # self.logger.addHandler(stderr)

        log = self.opts.log or self.config['crony'].get('log_file')
        if log:
            logfile = logging.FileHandler(log)
            logfile.setLevel(lvl)
            formatter = logging.Formatter(log_format, date_format)
            logfile.setFormatter(formatter)
            self.logger.addHandler(logfile)

        if self.sentry_client:
            sentry = SentryHandler(self.sentry_client)
            sentry.setLevel(logging.ERROR)
            self.logger.addHandler(sentry)

        self.logger.debug('Logging setup complete.')
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)