I''ve checked docs and searched this Slack and can...
# general
c
I''ve checked docs and searched this Slack and can't see how to redirect terminal output of a pants run to a file. Using
./pants test  my/path/to/test.py -l=debug > /tmp/test.log
doesn't seem to work.
f
There is
--logdir
to change where some logs files are written.
e
Pants aside, you're only redirecting stdout there.
f
also log output goes to stderr, so
2>
instead of
>
should work
or better:
>/tmp/test.log 2>&1
e
In bash and others? you can
&>
to redirect stdout and stderr at once.
c
Ahhh okay - thanks. I tried
--logdir
and didn't seem to get anything but i'll keep at it.
2>
works @fast-nail-55400 🙏
sorry for the noobness 😳
c
we’ve all been new at some point 😉