On 23 Nov 2015 07:07, Mike Frysinger wrote: > This helps a lot with debugging as you can quickly get a transcript > of the python code paths that are taken by catalyst.
example output:
$ ./bin/catalyst.git --trace
--- modulename: main, funcname: _main
0.00 main.py(284): log_level = opts.log_level
0.00 main.py(285): if log_level is None:
0.00 main.py(286): if opts.debug:
0.00 main.py(288): elif opts.verbose:
0.00 main.py(291): log_level = 'notice'
0.00 main.py(292): log.setup_logging(log_level, output=opts.log_file,
debug=opts.debug,
0.00 main.py(293): color=opts.color)
--- modulename: log, funcname: setup_logging
0.00 log.py(109): level = logging.getLevelName(level.upper())
0.00 log.py(112): fmt = '%(asctime)s: %(levelname)-8s: '
0.00 log.py(113): if debug:
0.00 log.py(115): fmt += '%(message)s'
0.00 log.py(118): if output is None:
0.00 log.py(119): handler =
logging.StreamHandler(stream=sys.stdout)
0.00 log.py(125): tzname = time.strftime('%Z', time.localtime())
0.00 log.py(126): datefmt = '%d %b %Y %H:%M:%S ' + tzname
0.00 log.py(127): formatter = CatalystFormatter(fmt, datefmt, color=color)
--- modulename: log, funcname: __init__
0.00 log.py(83): color = kwargs.pop('color', None)
0.00 log.py(84): if color is None:
0.00 log.py(85): color = self.detect_color()
--- modulename: log, funcname: detect_color
0.00 log.py(77): if 'NOCOLOR' is os.environ:
0.00 log.py(79): return os.isatty(sys.stdout.fileno())
0.00 log.py(86): if not color:
0.00 log.py(87): self._COLORS = {}
0.00 log.py(89): super(CatalystFormatter, self).__init__(*args,
**kwargs)
0.00 log.py(128): handler.setFormatter(formatter)
0.00 log.py(130): logger.addHandler(handler)
0.00 log.py(131): logger.setLevel(level)
0.00 main.py(296): myconfigs = opts.configs
0.00 main.py(297): if not myconfigs:
0.00 main.py(299): myspecfile = opts.file
0.00 main.py(300): mycmdline = opts.cli[:]
0.00 main.py(302): if opts.snapshot:
0.00 main.py(306): conf_values['DEBUG'] = opts.debug
0.00 main.py(307): conf_values['VERBOSE'] = opts.debug or opts.verbose
0.00 main.py(309): options = set()
0.00 main.py(310): if opts.fetchonly:
0.00 main.py(312): if opts.purge:
0.00 main.py(314): if opts.purgeonly:
0.00 main.py(316): if opts.purgetmponly:
0.00 main.py(318): if opts.clear_autoresume:
0.00 main.py(322): if not myspecfile and not mycmdline:
0.00 main.py(323): parser.error('please specify one of either -f
or -C or -s')
usage: catalyst [-h] [-V] [-d] [-v]
[--log-level {critical,error,warning,notice,info,debug}]
[--log-file LOG_FILE] [--color] [--nocolor] [--trace]
[--profile] [-a] [-p] [-P] [-T] [-F] [-c CONFIGS] [-f FILE]
[-s SNAPSHOT] [-C ...]
catalyst: error: please specify one of either -f or -C or -s
signature.asc
Description: Digital signature
