From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 2A9051384B4 for ; Mon, 23 Nov 2015 12:13:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 96C5521C081; Mon, 23 Nov 2015 12:13:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1758B21C081 for ; Mon, 23 Nov 2015 12:13:36 +0000 (UTC) Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 0270E33FDBF for ; Mon, 23 Nov 2015 12:13:34 +0000 (UTC) Date: Mon, 23 Nov 2015 07:13:35 -0500 From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH 1/2] main: add a --trace option Message-ID: <20151123121335.GG23754@vapier.lan> Mail-Followup-To: gentoo-catalyst@lists.gentoo.org References: <1448280461-12506-1-git-send-email-vapier@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="so9zsI5B81VjUb/o" Content-Disposition: inline In-Reply-To: <1448280461-12506-1-git-send-email-vapier@gentoo.org> X-Archives-Salt: fe800764-25c6-438e-80ff-a267905b8042 X-Archives-Hash: 731ebeec890fee7d553b006762d002f0 --so9zsI5B81VjUb/o Content-Type: text/plain; charset=utf-8 Content-Disposition: inline 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 --so9zsI5B81VjUb/o Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWUwLvAAoJEEFjO5/oN/WBObEQAN+jWiqoUFReuteEZpmfOcev GbOQd2H3gTUwAzg4kvFxk9BqJgAEwfofAygdTyoNm6T1RYhdzyP+/xwj6RHxR71d IrdNOxwFMBEeNnVjRdxmpevTo4E+YSZWp4Ip6owZa7k3ac6KcSn2CE8CGGYXH4yi 2UfQf4m8r0S9B8m1wH4QXFowIbvSq2qQ5aeSWHOm5B0VBQl0UKQPy7CZ6N3CegdR aAeUwRW8yeCIWX5UO6vdtqGUwp+vpDyvzyrt7mh1X3wn9M7al3SdE/0uNdftetOZ xEcG/7dAMpFfWkGC/ugcN7K8zSdRzSWKw4vsUuZdSAXrX9Egefm0kRTnLSy8u29i eluntaDZBR616w8mdGF92ZXag/mQqW5STzh8inoE2oJDi3I11fUiGosyHvt6Ch3D wgHoN/1QLg4pwSl1LKAQ9N7cJMMbvo6XIHpj4wcvZmI/xGzWkVCMUBx1DMXax5ko F7R7upk/HlzBkRr3TdtiIiprp5BB9lQK4njOU9OPGNeTl2MZshY6FC9oBAZW1qL8 ze4dn150ZORpWIokoUsKAmOUKp6BwTNIBl2SZHfHcUsLThF9XvEYm5X781A/yu3Z oLOa4FiOTCblezmojFIhHdEOubSjo2WV3zZqFLPRj6m0Ibcm4JOq6khpi5rpj932 SbuDPMhuMMCB19fMldXW =84V1 -----END PGP SIGNATURE----- --so9zsI5B81VjUb/o--