所以在我的系統中,監控程序捕獲標準錯誤和標準輸出到這些文件:如何更改由主管啓動的進程的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
然而,它沒有采取任何影響的。我錯過了配置中的任何東西嗎?