英文:
supervisor does not write more log
问题
我正在使用supervisord来部署我的Go应用程序,我有一个/var/log/supervisor目录,这是应用程序日志的目录。然而,我发现在一定时间后,没有新的日志被写入应用程序日志中。似乎supervisord无法写入文件。可能是什么原因导致这种情况呢?
英文:
I am using supervisord to deploy my go application, and I have a /var/log/supervisor directory, which is the directory of application log. However, I found after certain times. No new log is write to the application log. Seems supervisord cannot write to the file. What can be the reason causing it?
答案1
得分: 1
主管无法写入日志文件可能有多个原因。
- 可能您已经使用不允许主管写入的不同权限创建了日志文件。
- 当您在应用程序的配置中未指定
stdout_logfile
和stderr_logfile
时,主管将在日志文件名的末尾附加一个唯一的ID。 - 主管只会写入发送到
stdout
和stderr
的内容。您确定您没有在其他地方写入吗?
还要确保查看/var/log/supervisor/supervisord.log
文件,也许有您不知道的错误。
还要确保阅读有关子进程日志记录的文档这里。
英文:
There could be multiple reasons for supervisor not being able to write the log files.
- Maybe you already created the log file with different permissions that don't allow supervisor to write in there.
- When you don't specify
stdout_logfile
andstderr_logfile
in your application's configuration, supervisor will append a unique ID at the end of the log file name. - Supervisor only writes what's being sent to
stdout
andstderr
. Are you sure you're not writing somewhere else ?
Also make sure to have a look inside the /var/log/supervisor/supervisord.log
file, maybe there are errors you're unaware of.
Also make sure you read the documentation about child process logging there.
1: http://supervisord.org/logging.html "there"
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论