polite-angle-82480
11/04/2024, 4:24 PM.pants.d
):
• pants.log
as a kind of “top-level” log
• run-tracker
as detailed log of each `pants`run
eg if I set
[GLOBAL]
pants_workdir = "workdir"
logdir = "logs"
logs
is always empty. Is it still true that logdir is not wired up to anything?polite-angle-82480
11/04/2024, 11:17 PMpolite-angle-82480
11/04/2024, 11:17 PMbroad-processor-92400
11/04/2024, 11:19 PMlogdir
option isn't used for anythingpolite-angle-82480
11/04/2024, 11:20 PM[]
):polite-angle-82480
11/04/2024, 11:21 PMpants version -ldebug
lol. Lots of screen output, empty jsonbroad-processor-92400
11/04/2024, 11:22 PMpants run ...
or pants test ...
, even if that process isn't successful)polite-angle-82480
11/04/2024, 11:23 PMhappy-kitchen-89482
11/04/2024, 11:27 PM-ldebug
to generate more verbositybroad-processor-92400
11/04/2024, 11:30 PMlogdir
option doing nothing, thanks for raising)polite-angle-82480
11/04/2024, 11:30 PMpolite-angle-82480
11/04/2024, 11:42 PMpolite-angle-82480
11/04/2024, 11:44 PMworkdir/pants.log
and workdir/run-tracker
logs is because those logs don’t have everything. “everything” in this case is all stdout+stderr output to screenbroad-processor-92400
11/04/2024, 11:45 PMpolite-angle-82480
11/05/2024, 12:47 AMpants run src/package_a/failing_script.py
and `raise`s an error output to stdout looks great but the log files are silentpolite-angle-82480
11/05/2024, 12:47 AMpolite-angle-82480
11/05/2024, 12:51 AMpants.log
(logs the command that was ran) and run-tracker
(logs the output) dirs and “stick” the 2 logs together (then ship those logs off the Macs to somewhere I can store and comb thru them later). Doing this is something I’m trying to avoid at all costs due to the huge PITA it’s going to be to write and maintainbroad-processor-92400
11/05/2024, 2:20 AMbroad-processor-92400
11/05/2024, 2:25 AM[INFO]
/ [ERROR]
etc. lines that pants was printing, and errors about configuration)
2. your user code arbitrary logging/printing (e.g. that exception caused by failing_script.py
itself directly raising it)
Are you wanting to syphon off both of these into an external system for analysis?
You could play games like a wrapper script around pants that runs something like pants "$@" |& tee logs.txt
or whatever... but I think this'll start interfering with, for instance, control codes that interact with the terminal (sounds like you're aware of this, though)polite-angle-82480
11/05/2024, 4:21 PMAre you wanting to syphon off both of these into an external system for analysis?yes exactly this Reading the issue 9988 you linked to, I still think it only concerns (1) pants output only. I’m looking to grab the response from python itself (2)
polite-angle-82480
11/05/2024, 4:24 PM