Change log entry point
553856
@RequestMapping(value = "changelog", method = RequestMethod.GET)
    public BuildDiff changeLog(BuildDiffRequest request) {
        SVNChangeLog changeLog = changeLogService.changeLog(request);
        // Stores in cache
        logCache.put(changeLog.getUuid(), changeLog);
        // OK
        return changeLog;
    }
326344
def _initialize_logging():
    

    # Starting the console handler if a terminal is available.
    if sys.stdout.isatty() or platform.system() in ("Darwin", "Linux"):
        RuntimeGlobals.logging_console_handler = foundations.verbose.get_logging_console_handler()

    # Defining logging formatters.
    RuntimeGlobals.logging_formatters = {"Default": foundations.verbose.LOGGING_DEFAULT_FORMATTER,
                                         "Extended": foundations.verbose.LOGGING_EXTENDED_FORMATTER,
                                         "Standard": foundations.verbose.LOGGING_STANDARD_FORMATTER}
298518
def add_entry_point(self, destination):
        '''
        '''
        self.routes.setdefault('__entry_point', set()).add(destination)
        return self.routes['__entry_point']
801637
def cli(context, verbose, api_key, base_url, workers):
    ''''''

    configure_logging(verbose)

    client_params.clear()
    client_params['api_key'] = api_key
    client_params['workers'] = workers
    if base_url:
        client_params['base_url'] = base_url
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)
1346602
def LogInit():
  """"""
  logging.debug("Initializing client logging subsystem.")

  # The root logger.
  logger = logging.getLogger()
  memory_handlers = [
      m for m in logger.handlers
      if m.__class__.__name__ == "PreLoggingMemoryHandler"
  ]

  # Clear all handers.
  logger.handlers = list(GetLogHandlers())
  SetLogLevels()

  # Now flush the old messages into the log files.
  for handler in memory_handlers:
    for record in handler.buffer:
      logger.handle(record)
896011
def main():
    """"""
    logging.basicConfig(format=LOGGING_FORMAT)

    parser = argparse.ArgumentParser(description='Example with non-optional arguments')

    add_debug(parser)
    add_app(parser)
    add_env(parser)
    add_region(parser)
    add_properties(parser)

    args = parser.parse_args()

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

    elb = SpinnakerELB(app=args.app, env=args.env, region=args.region, prop_path=args.properties)
    elb.create_elb()
612162
def set_up(verbose, quiet):
    """"""
    logger = logging.getLogger('fades')
    logger.setLevel(logging.DEBUG)

    # select logging level according to user desire; also use a simpler
    # formatting for non-verbose logging
    if verbose:
        log_level = logging.DEBUG
        log_format = FMT_DETAILED
    elif quiet:
        log_level = logging.WARNING
        log_format = FMT_SIMPLE
    else:
        log_level = logging.INFO
        log_format = FMT_SIMPLE

    # all to the stdout
    handler = SalutingStreamHandler(logger)
    handler.setLevel(log_level)
    logger.addHandler(handler)
    formatter = logging.Formatter(log_format)
    handler.setFormatter(formatter)

    # and to the syslog
    for syslog_path in ('/dev/log', '/var/run/syslog'):
        if not os.path.exists(syslog_path):
            continue
        try:
            handler = logging.handlers.SysLogHandler(address=syslog_path)
        except Exception:
            # silently ignore that the user doesn't have a syslog active; can
            # see all the info with "-v" anyway
            pass
        else:
            logger.addHandler(handler)
            formatter = logging.Formatter(FMT_SYSLOG)
            handler.setFormatter(formatter)
            break

    return logger
1261483
def entry_point():
    """"""
    signal.signal(signal.SIGINT, lambda *_: getattr(os, '_exit')(0))  # Properly handle Control+C
    config = get_arguments()
    setup_logging(config['verbose'])
    try:
        main(config)
    except HandledError:
        if config['raise']:
            raise
        logging.critical('Failure.')
        sys.exit(0 if config['ignore_errors'] else 1)
676346
public void changeLoglevel(LoglevelCommand loglevelCommand) {
        pubSubService.fire(LoglevelProperty.REDIS_KEY_PREFIX + "pubsub", Json.toJson(loglevelCommand, JsonFormat.compact()));
    }
237096
def main():
    """"""
    import getopt
    from . import __version__ as VERSION

    try:
        option_list, argument_list = getopt.gnu_getopt(
            sys.argv[1:], 'h',
            ['version', 'help', 'json-module=', 'debug', 'log-file='])

        message = None
        for option, value in option_list:
            if option in ('--version'):
                message = _VERSION % dict(name=os.path.basename(sys.argv[0]),
                                      version=VERSION)
            elif option in ('-h', '--help'):
                message = _HELP % dict(name=os.path.basename(sys.argv[0]))
            elif option in ('--json-module'):
                json.use(module=value)
            elif option in ('--debug'):
                log.setLevel(logging.DEBUG)
            elif option in ('--log-file'):
                if value == '-':
                    handler = logging.StreamHandler(sys.stderr)
                    handler.setFormatter(logging.Formatter(
                        ' -> [%(levelname)s] %(message)s'))
                else:
                    handler = logging.FileHandler(value)
                    handler.setFormatter(logging.Formatter(
                        '[%(asctime)s] [%(levelname)s] %(message)s'))
                log.addHandler(handler)
        if message:
            sys.stdout.write(message)
            sys.stdout.flush()
            sys.exit(0)

    except getopt.GetoptError, error:
        message = '%s\n\nTry `%s --help` for more information.\n' % (
            str(error), os.path.basename(sys.argv[0]))
        sys.stderr.write(message)
        sys.stderr.flush()
        sys.exit(1)

    sys.exit(run())
998212
def init_log(log_level):
    """"""
    log_level = log_level or "INFO"
    logging.basicConfig(
        format="%(name)s:%(levelname)s:%(message)s",
        level=getattr(logging, log_level.upper(), logging.INFO),
    )
1234142
def initialise_logging(level: str, target: str, short_format: bool):
    """"""
    try:
        log_level = getattr(logging, level)
    except AttributeError:
        raise SystemExit(
            "invalid log level %r, expected any of 'DEBUG', 'INFO', 'WARNING', 'ERROR' or 'CRITICAL'" % level
        )
    handler = create_handler(target=target)
    logging.basicConfig(
        level=log_level,
        format='%(asctime)-15s (%(process)d) %(message)s' if not short_format else '%(message)s',
        datefmt='%Y-%m-%d %H:%M:%S',
        handlers=[handler]
    )
369652
def cli_run():
    """"""
    options = CLI.parse_args()
    run(options.CONFIGURATION, options.log_level, options.log_target, options.log_journal)
414809
def main(_):
  """"""
  utility.set_up_logging()
  if not FLAGS.config:
    raise KeyError('You must specify a configuration.')
  logdir = FLAGS.logdir and os.path.expanduser(os.path.join(
      FLAGS.logdir, '{}-{}'.format(FLAGS.timestamp, FLAGS.config)))
  try:
    config = utility.load_config(logdir)
  except IOError:
    config = tools.AttrDict(getattr(configs, FLAGS.config)())
    config = utility.save_config(config, logdir)
  for score in train(config, FLAGS.env_processes):
    tf.logging.info('Score {}.'.format(score))
158509
def main():
    """"""
    formatter = ColoredFormatter(log_colors={'TRACE': 'yellow'})

    handler = logging.StreamHandler()
    handler.setFormatter(formatter)

    logger = logging.getLogger('example')
    logger.addHandler(handler)
    logger.setLevel('TRACE')

    logger.log(5, 'a message using a custom level')
392036
def configure():
    """"""
    log_levels = {
        5: logging.NOTSET,
        4: logging.DEBUG,
        3: logging.INFO,
        2: logging.WARNING,
        1: logging.ERROR,
        0: logging.CRITICAL
    }

    logging.captureWarnings(True)
    root_logger = logging.getLogger()
    if settings.CFG["debug"]:
        details_format = logging.Formatter(
            '%(name)s (%(filename)s:%(lineno)s) [%(levelname)s] %(message)s')
        details_hdl = logging.StreamHandler()
        details_hdl.setFormatter(details_format)
        root_logger.addHandler(details_hdl)
    else:
        brief_format = logging.Formatter('%(message)s')
        console_hdl = logging.StreamHandler()
        console_hdl.setFormatter(brief_format)
        root_logger.addHandler(console_hdl)
    root_logger.setLevel(log_levels[int(settings.CFG["verbosity"])])

    configure_plumbum_log()
    configure_migrate_log()
    configure_parse_log()