https://pantsbuild.org/ logo
#pex
Title
# pex
w

witty-crayon-22786

04/07/2020, 10:34 PM
so, i'm debugging an issue that looks like it will require getting verbose logging from the
pip
invokes running under
pex
... https://github.com/pantsbuild/pants/pull/9328 propagated pants' logging to pex, but pex does not propagate its own log level to pip
i could have sworn that i saw a
pex
PR to propagate its level to
pip
, but it does not seem to be in 2.1.7
if i totally imagined that PR, i can take a swing at it.
(ie propagating
-vvvv
from pex to pip)
h

hundreds-father-404

04/07/2020, 10:40 PM
I could have Sworn John did this to. Something about how Pip only goes up to
-vvv
but Pex goes up to 9
w

witty-crayon-22786

04/07/2020, 10:42 PM
Exactly... I saw it too, heh
But yea, I'm not seeing it passed in 2.1.7
oh. yea, didn't imagine it... it's just much, much older: https://github.com/pantsbuild/pex/blob/a7d98116daedcacda4716ebc9ca831303f24b71f/pex/pip.py#L73-L79 and ... not working, maybe
👍 1
aha.
it doesn't work if PEX_VERBOSE is an env var, but it does when passed from the cli.
h

hundreds-father-404

04/08/2020, 12:22 AM
Ah. Probably an over sight
w

witty-crayon-22786

04/08/2020, 12:25 AM
e

enough-analyst-54434

04/10/2020, 4:12 PM
The Pex CLI has actually always worked this way. PEX_VERBOSE controls runtime logging of PEXes. The
-v
arg controls buildtime logging of the Pex CLI.
ENV.PEX_VERBOSE
is used as a middleman to shuffle these values around in the code. I've updated the issue and am looking at the Pants use case.
👍 1
w

witty-crayon-22786

04/10/2020, 4:14 PM
Mmm. Yes. Remembering now. The thing that threw me off is that when pex is packaged as a pex, you do get some output due to the runtime pex loading itself
e

enough-analyst-54434

04/10/2020, 4:15 PM
@witty-crayon-22786 you're debugging v1 use of Pex via the API and not v2 use of Pex via the CLI?
Basically, exactly what task or rule are you debugging - that'll help me answer / fix.
w

witty-crayon-22786

04/10/2020, 4:16 PM
I'm actually debugging direct usage of pex in the release scripts. Got the verbose output, and it looks like a tag mismatch.
Thank you: but I don't have it in front of me right now: will start a thread a bit later
e

enough-analyst-54434

04/10/2020, 4:17 PM
OK. So, you just added -vvv... in that script.
OK, I'll leave the Pex issue open for now and marked answered. Its not clear to me whether or not muddling the env var with the -v for the CLI is good or bad yet as a new feature.
w

witty-crayon-22786

04/10/2020, 4:18 PM
Thanks!