2015-08-20 104 views
0

我在supervisord配置如下:Supervisord日誌文件

[program:nodejs] 
command=node server.js 
autostart=true 
autorestart=true 
stderr_logfile=/home/user/logs/nodejs.err.log 
stderr_outfile=/home/user/logs/nodejs.out.log 

我沒有看到登錄/logs目錄中創建的文件。我看到在/tmp/nodejs_some_random_string.log中創建了臨時日誌文件。爲了讓配置中指定的日誌文件正確創建,我缺少什麼?

回答

0

supervisord與stderr_outfile沒有配置重點 - 退房child-process-logs

使用stdout_logfilestderr_logfile

嘗試這樣的:

[program:nodejs] 
command=node server.js 
autostart=true 
autorestart=true 
stderr_logfile=/home/user/logs/nodejs.err.log 
stdout_logfile=/home/user/logs/nodejs.out.log 

see example configuration

+0

謝謝!我的眼睛沒有接觸到錯字。 –