nohup python3 main.py > log.output &
So with this, I am getting some output by my framework but my individual print
statements are not being logged to log.output
. Is there anyway to fix this?
Output under nohup
nohup: ignoring input
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 571-306-491
XXX - - [28/Jan/2018 17:56:42] "POST /TestEndpoint HTTP/1.1" 201 -
XXX - - [28/Jan/2018 17:57:00] "POST /TestEndpoint HTTP/1.1" 201 -
Normal running output
python3 main.py
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
* Restarting with stat
* Debugger is active!
* Debugger PIN: 571-306-491
test endpoint
XXX - - [28/Jan/2018 18:01:52] "POST /TestEndpoint HTTP/1.1" 201 -
Tried all of these :
nohup python3 -u main.py &
nohup python3 main.py > log.output 2>&1 &
nohup python3 -u main.py > log.output 2>&1 &
nohup python3 main.py > log.output &
nohup python3 -u main.py > log.output &
only this shows the correct output python3 main.py