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 2594313888F for ; Fri, 9 Oct 2015 01:25:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69F9921C002; Fri, 9 Oct 2015 01:25:19 +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 12D5821C002 for ; Fri, 9 Oct 2015 01:25:19 +0000 (UTC) Received: from professor-x (S010634bdfa9ecf80.vc.shawcable.net [96.49.31.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dolsen) by smtp.gentoo.org (Postfix) with ESMTPSA id 065D034070A for ; Fri, 9 Oct 2015 01:25:16 +0000 (UTC) Date: Thu, 8 Oct 2015 18:24:15 -0700 From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] standardizing output Message-ID: <20151008182415.10851222.dolsen@gentoo.org> In-Reply-To: <20151009003825.GD29146@vapier.lan> References: <20151009003825.GD29146@vapier.lan> Organization: Gentoo 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-sha512; boundary="Sig_/AsBBG9j1u7O4oudphskwrH4"; protocol="application/pgp-signature" X-Archives-Salt: 04aa5127-87c9-4eb7-8b27-37069b3a4785 X-Archives-Hash: 3a9e671e73655857fbb29d24a21b5743 --Sig_/AsBBG9j1u7O4oudphskwrH4 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 8 Oct 2015 20:38:25 -0400 Mike Frysinger wrote: > how do people feel about killing off the use of "print" everywhere and > moving to the standard logging module ? biggest advantages in my > mind: > - we get much easier control over where the output goes > (file/stdout/...) > - we force people to select a level (info/warning/error) > - we get standardized output > - we can more easily control the output (debug/verbose/etc...) > - we can include module/func/line info transparently in debug modes > - we can exit transparently on fatal/critical messages (rather than > using die/exit/etc... directly) > - we can colorize warnings/errors transparently > - we get py3 compat for free (all current print usage is py2-only) > -mike It's been on our wish list for several years. So go for it! That'll be one less thing holding up p3 compatibility. I've added some extra print statements in there doing the re-write, but there was just too much in there that needed fixing. One thing that is needed more than that still is: There are still some hard coded paths. I believe they are only in the bash support scripts. I should have all of the python side changed over. All exported variables from python to bash are prefixed with clst_ and dashes and slashes are replaced with "_" if they are in the variable name. We are not able to relocate the main gentoo tree until those are fixed. It was how I got started re-writing catalyst in the first place. Then on the python side paths were hard coded EVERYWHERE and used as both a variable name and value.=20 --=20 Brian Dolbec --Sig_/AsBBG9j1u7O4oudphskwrH4 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.1 iQJ8BAEBCgBmBQJWFxc/XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNUQ3Qzc0RTA4MUNDNzBEQjRBNEFBRjVG QkJEMDg3Mjc1ODIwRUQ4AAoJEPu9CHJ1gg7YkQcQALfpCCcYn7qUfmJJlocW65kQ 2/IiIUoWPuRJeo1jQj1xv8IMMhKnfc83lYM8QUZDHB1WzqR8ESn3LJbSs96Hv8QF C6auctTbnq2TlAWCQz1FRc8YfERTOXRXElhjb8pXPM7G/d2V2r06nYrn6KmQ2VIP pLlF9ViG0NQQrf35emRqLLjkpdnVTbSs8rBZlgLK0/AAfgPL/f5U+ndlLYmpan1A NN9msylPcmYywrVp5AiwKE5ANF3xiVRirnWr6EED8Koza2JzWLtqCvBruQcWdyb+ yqUSltU5JZSK7J3ClzOPIkDwRnogimsvhQ1GLHAsNfIHaRyzvNVJmilKAA/jM2Dk Zv09iIlEKKzUlBhNrHJGUaXk1kfOIU8RLqmWa6FxeEo/mYjbjYQ3SRPJRWYJeD4i bmmkhNHw7FteoMwfOxQyuOBjtMkMUIadnbJ1sIMjVctrEZkIBSGkxliHubY6p2PQ XUDS1WPGVpvk6KGawRyQF1/GqsHsRXxN2uzKy2OA3UKH+uiwho1xLDo+hhp0dEdJ Csjtq1ky3hLovH4UviH4z4/HBXZ5Gx5fxfH6UfKlzVsROOqiieVrL5T2G7qYOw4g uUyKPfKOH3KVaZ1/hIw8uOZl9Ut8vbGIz4E04LEho5opxzLpB/mbI2rrP7zgbbTT 4j7lZXS6t81ICxg5zC80 =4L+q -----END PGP SIGNATURE----- --Sig_/AsBBG9j1u7O4oudphskwrH4--