1 |
On Thu, 8 Oct 2015 20:38:25 -0400 |
2 |
Mike Frysinger <vapier@g.o> wrote: |
3 |
|
4 |
> how do people feel about killing off the use of "print" everywhere and |
5 |
> moving to the standard logging module ? biggest advantages in my |
6 |
> mind: |
7 |
> - we get much easier control over where the output goes |
8 |
> (file/stdout/...) |
9 |
> - we force people to select a level (info/warning/error) |
10 |
> - we get standardized output |
11 |
> - we can more easily control the output (debug/verbose/etc...) |
12 |
> - we can include module/func/line info transparently in debug modes |
13 |
> - we can exit transparently on fatal/critical messages (rather than |
14 |
> using die/exit/etc... directly) |
15 |
> - we can colorize warnings/errors transparently |
16 |
> - we get py3 compat for free (all current print usage is py2-only) |
17 |
> -mike |
18 |
|
19 |
|
20 |
It's been on our wish list for several years. So go for it! |
21 |
|
22 |
That'll be one less thing holding up p3 compatibility. |
23 |
|
24 |
I've added some extra print statements in there doing the re-write, but |
25 |
there was just too much in there that needed fixing. |
26 |
|
27 |
One thing that is needed more than that still is: |
28 |
|
29 |
There are still some hard coded paths. I believe they are only in the |
30 |
bash support scripts. I should have all of the python side changed |
31 |
over. |
32 |
|
33 |
All exported variables from python to bash are prefixed with clst_ and |
34 |
dashes and slashes are replaced with "_" if they are in the variable |
35 |
name. |
36 |
|
37 |
We are not able to relocate the main gentoo tree until those are fixed. |
38 |
|
39 |
It was how I got started re-writing catalyst in the first place. Then |
40 |
on the python side paths were hard coded EVERYWHERE and used as both a |
41 |
variable name and value. |
42 |
-- |
43 |
Brian Dolbec <dolsen> |