As shown below, I want the normal output of logging to an empty file and the error output to server1.err. However, during actual operation, the normal output is also output to server1.err. How can I achieve this and only output the error log to in server1.err? ? ?
Did you use print for log output? If you use the logging module, you should not need to point to the output. You can point info and warning to different loggers
You first try redirecting only errors and redirecting normally, instead of redirecting both at the same time, to see if the code is wrong.