3

God has helped us keep a few services running on a Rails box (Nginx and MySQLd, specifically) but I'm hoping to get some more details when it actually swings into action. So far, setting the watch log file using w.log = /var/log/god/mysql.log (for example) gets us a lot of stuff like this:

ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
 * Starting MySQL database server mysqld
   ...done.

...which is cool enough in its way, because it tells me that the server went down and God restarted it, but I'm hoping for something like a timestamp and maybe some other details. (Server load, memory status, or something else to help me diagnose why MySQLd went down to begin with.)

Does God support adding extra information to logfiles when events like this are triggered?

4

1 に答える 1

2

少なくとも、神を次のように開始することで、タイムスタンプを取得できるはずです。

god -Dc config/sst.god --log-level debug

しかし、私が知る限り、w.log ファイルには、ログ メッセージの前に既にタイムスタンプが存在するはずです。ログファイルのカスタマイズに関する限り、それは数年前から問題になっているようです (短い答え: オプションではありません)。

于 2010-12-18T09:57:18.837 に答える