主管没有写更多的日志

huangapple go评论86阅读模式
英文:

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

主管无法写入日志文件可能有多个原因。

  1. 可能您已经使用不允许主管写入的不同权限创建了日志文件。
  2. 当您在应用程序的配置中未指定stdout_logfilestderr_logfile时,主管将在日志文件名的末尾附加一个唯一的ID。
  3. 主管只会写入发送到stdoutstderr的内容。您确定您没有在其他地方写入吗?

还要确保查看/var/log/supervisor/supervisord.log文件,也许有您不知道的错误。

还要确保阅读有关子进程日志记录的文档这里

英文:

There could be multiple reasons for supervisor not being able to write the log files.

  1. Maybe you already created the log file with different permissions that don't allow supervisor to write in there.
  2. When you don't specify stdout_logfile and stderr_logfile in your application's configuration, supervisor will append a unique ID at the end of the log file name.
  3. Supervisor only writes what's being sent to stdout and stderr. 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"

huangapple
  • 本文由 发表于 2016年11月23日 11:15:54
  • 转载请务必保留本文链接:https://go.coder-hub.com/40755404.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定