所以在我的系统中,监控程序捕获标准错误和标准输出到这些文件:如何更改由主管启动的进程的stdout和stderr日志位置?
[email protected]:/var/log/supervisor# ls -l
total 24
-rw------- 1 root root 18136 Sep 14 03:35 gunicorn-stderr---supervisor-VVVsL1.log
-rw------- 1 root root 0 Sep 14 03:35 gunicorn-stdout---supervisor-lllimW.log
-rw------- 1 root root 0 Sep 14 03:35 nginx-stderr---supervisor-HNIPIA.log
-rw------- 1 root root 0 Sep 14 03:35 nginx-stdout---supervisor-2jDN7t.log
-rw-r--r-- 1 root root 1256 Sep 14 03:35 supervisord.log
但我想改变gunicorn的输出和错误日志文件的位置在/ var /日志/ gunicorn和固定的文件名用于监控目的。
这是我在配置文件中做了:
[program:gunicorn]
stdout_capture_maxbytes=50MB
stderr_capture_maxbytes=50MB
stdout = /var/log/gunicorn/gunicorn-stdout.log
stderr = /var/log/gunicorn/gunicorn-stderr.log
command=/usr/bin/gunicorn -w 2 server:app
然而,它没有采取任何影响的。我错过了配置中的任何东西吗?