1

I am using Django and I am getting a ton of errors and deprecation warning when I run tests and unsilence the warnings with the command...

python -Wall manage.py test

In regular bash I would usually do soemthing like this...

command > log.log

but that is not working, or it is only writing a very small fraction of the output to a file. I could write a python script, but the output is likely soming from all over the Django frameword and I would really rather just get this output into a file.

I have also tried the -u option on the python comand and that did not work either

Joff
  • 11,247
  • 16
  • 60
  • 103

1 Answers1

1

If you're seeing errors written to stdout and stderr both, then you'll want to redirect both of them:

 python -Wall manage.py test >log.log 2>&1

There's (much) more here about shell redirection: In the shell, what does " 2>&1 " mean?

Community
  • 1
  • 1
vielmetti
  • 1,864
  • 16
  • 23