https://pantsbuild.org/ logo
#development
Title
# development
f

fresh-cat-90827

11/22/2022, 9:04 PM
when doing
print
from a `@rule`'s body, I get
Copy code
21:02:46.12 [INFO] stdout: "hello!"
21:02:46.12 [INFO] stdout: "\n"
the
goal_rule
has fancy
from pants.engine.console import Console
, but how do I go about printing from the
rule
? 😕
1
b

bitter-ability-32190

11/22/2022, 9:05 PM
You log!
logger.warning(...)
See Pants' own codebase
In other words, no printing, only logging 🙂
1
logging will log, but
Console
output should be used if that’s the “point of” your goal
1
oh. but yea, i misunderstood the question. `@rule`s use logging, yea.
❤️ 1