【发布时间】:2018-01-28 17:48:31
【问题描述】:
nohup python3 main.py > log.output &
因此,我的框架得到了一些输出,但我的个人print 语句没有被记录到log.output。有没有什么办法解决这一问题?
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 -
正常运行输出
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 -
尝试了所有这些:
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 &
只有这显示正确的输出python3 main.py
【问题讨论】:
-
@venky__ 我尝试了那里的所有解决方案,但没有一个会导致我的打印显示在我的显示中
标签: python