Development logger.
10753
function dev() {
  return function logger(ctx, next) {
    // request
    const start = new Date();
    /* eslint no-console: 0 */
    console.log(`  ${chalk.gray('<--')} ${chalk.bold(ctx.method)} ${chalk.gray(ctx.originalUrl)}`);


    // calculate the length of a streaming response
    // by intercepting the stream with a counter.
    // only necessary if a content-length header is currently not set.
    const length = ctx.response.length;
    const body = ctx.body;
    let counter;
    if ((length === null || length === undefined) && body && body.readable) {
      /* eslint no-param-reassign: 0 */
      ctx.body = body
        .pipe(counter = new Counter())
        .on('error', ctx.onerror);
    }

    // log when the response is finished or closed,
    // whichever happens first.
    const res = ctx.res;
    const onfinish = done.bind(null, 'finish');
    const onclose = done.bind(null, 'close');
    /* eslint no-use-before-define: 0 */
    function done(event) {
      res.removeListener('finish', onfinish);
      res.removeListener('close', onclose);
      log(ctx, start, counter ? counter.length : length, null, event);
    }

    res.once('finish', onfinish);
    res.once('close', onclose);
    return next();
  };
}
173849
public function changelogAction()
    {
        $this->_showText(sprintf($this->_('Changelog %s'), $this->escort->project->name), APPLICATION_PATH . '/changelog.txt');
    }
762828
def debug(message, domain):
        """"""
        if domain in Logger._ignored_domains:
            return

        Logger._log(None, message, DEBUG, domain)
493823
def logger(self):
        """"""
        try:
            return self._logger
        except AttributeError:
            name = '%s.%s' % (self.__module__, self.__class__.__name__)
            self._logger = logging.getLogger(name)
            self.logger.debug('Initializing...')
            return self._logger
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
924644
def get_logger(self, name="deployment-logger", level=logging.DEBUG):
        """"""
        log = logging
        logger = log.getLogger(name)
        fmt = log.Formatter("%(asctime)s %(funcName)s "
                            "%(levelname)s: %(message)s")

        handler = log.StreamHandler(stream=sys.stdout)
        handler.setLevel(level)
        handler.setFormatter(fmt)

        logger.addHandler(handler)
        logger.setLevel(level)

        return logger
69300
def generate_changelog(context):
    """"""

    changelog_content = [
        '\n## [%s](%s/compare/%s...%s)\n\n'
        % (
            context.new_version,
            context.repo_url,
            context.current_version,
            context.new_version,
        )
    ]

    git_log_content = None
    git_log = 'log --oneline --no-merges --no-color'.split(' ')
    try:
        git_log_tag = git_log + ['%s..master' % context.current_version]
        git_log_content = git(git_log_tag)
        log.debug('content: %s' % git_log_content)
    except Exception:
        log.warn('Error diffing previous version, initial release')
        git_log_content = git(git_log)

    git_log_content = replace_sha_with_commit_link(context.repo_url, git_log_content)
    # turn change log entries into markdown bullet points
    if git_log_content:
        [
            changelog_content.append('* %s\n' % line) if line else line
            for line in git_log_content[:-1]
        ]

    write_new_changelog(
        context.repo_url, 'CHANGELOG.md', changelog_content, dry_run=context.dry_run
    )
    log.info('Added content to CHANGELOG.md')
    context.changelog_content = changelog_content
819548
def log(self, *lines):
        """"""
        if getattr(self, "debug", False):
            print(dt.datetime.now().time(), end=' ')
            for line in lines:
                print(line, end=' ')
            print()
1199841
private Logger log()
    {

        if (log == null)
        {
            log = Logger.getLogger(_PackageInfo.class.getName());
        }
        return log;

    }
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()
557764
def logger():
    """"""

    scriptlogger = logging.getLogger(__program__)

    # ensure logger is not reconfigured
    if not scriptlogger.hasHandlers():

        # set log level
        scriptlogger.setLevel(logging.INFO)

        fmt = '%(name)s:%(levelname)s: %(message)s'

        # configure terminal log
        streamhandler = logging.StreamHandler()
        streamhandler.setFormatter(logging.Formatter(fmt))
        scriptlogger.addHandler(streamhandler)
572026
def log_transition(self, transition, from_state, instance, *args, **kwargs):
        """"""
        save = kwargs.pop('save', True)
        log = kwargs.pop('log', True)
        super(Workflow, self).log_transition(
            transition, from_state, instance, *args, **kwargs)
        if save:
            instance.save()
        if log:
            self.db_log(transition, from_state, instance, *args, **kwargs)
950183
def main():
    """"""
    logging.basicConfig(format=LOGGING_FORMAT)
    log = logging.getLogger(__name__)

    parser = argparse.ArgumentParser()
    add_debug(parser)
    add_app(parser)
    add_properties(parser)
    add_env(parser)
    add_region(parser)
    args = parser.parse_args()

    logging.getLogger(__package__.split('.')[0]).setLevel(args.debug)

    log.debug('Parsed arguments: %s', args)

    asgpolicy = AutoScalingPolicy(app=args.app, prop_path=args.properties, env=args.env, region=args.region)

    asgpolicy.create_policy()
541466
public function log(): void
    {
        if (file_exists(FLOW_PATH_DATA . 'Logs/Elasticsearch') && is_dir(FLOW_PATH_DATA . 'Logs/Elasticsearch') && is_writable(FLOW_PATH_DATA . 'Logs/Elasticsearch')) {
            file_put_contents($this->filename, $this->renderErrors());
            $this->logger->log($this->message, LOG_ERR, [], 'Flowpack.ElasticSearch.ContentRepositoryAdaptor', __CLASS__, __FUNCTION__);
        } else {
            $this->logger->log(sprintf('Could not write indexing errors backtrace into %s because the directory could not be created or is not writable.', FLOW_PATH_DATA . 'Logs/Elasticsearch/'), LOG_WARNING, [], 'Flowpack.ElasticSearch.ContentRepositoryAdaptor', __CLASS__, __FUNCTION__);
        }
    }
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)
878888
def dev():
    """"""
    env.roledefs = {
        'web': ['192.168.1.2'],
        'lb': ['192.168.1.2'],
    }
    env.user = 'vagrant'
    env.backends = env.roledefs['web']
    env.server_name = 'django_search_model-dev.net'
    env.short_server_name = 'django_search_model-dev'
    env.static_folder = '/site_media/'
    env.server_ip = '192.168.1.2'
    env.no_shared_sessions = False
    env.server_ssl_on = False
    env.goal = 'dev'
    env.socket_port = '8001'
    env.map_settings = {}
    execute(build_env)
489658
def debug(verbose, bot, proxy, exp_config=None):
    """"""
    debugger = DebugDeployment(Output(), verbose, bot, proxy, exp_config)
    log(header, chevrons=False)
    debugger.run()