https://pantsbuild.org/ logo
w

witty-crayon-22786

09/21/2021, 5:35 PM
to debug something, i semi-hackily added logging initialization to RuleRunner for tests… the primary reason it’s hacky is that logging involves some context managers
and it’s overkill for most tests probably.
but maybe it would be useful as a decorator that you could sprinkle around while debugging?
👍 2
in case you missed it, this landed as https://github.com/pantsbuild/pants/pull/13060
cc @bored-art-40741: for java compilation tests
b

bored-art-40741

10/05/2021, 12:41 AM
Would it make sense to rename this decorator to like
log
or something like that?
logging
clashes with the very commonly imported system lib
logging
, which also means it's very awkward in practice to actually pass a
logging.LEVEL
to the
@logging
decorator
w

witty-crayon-22786

10/05/2021, 2:19 AM
Yep, feel free