The Python command output redirected to a log file, and found that the output is not written to the log file
The reason is that Python did a cache, the cache should remove the need to add parameters -u
such as
nohup python -u test.py > test.log 2>&1 &