Is it possible to execute custom code when God restarts a process. Please 
see sample below of what I mean. When watch transitions from :up to :start 
(process restarted), we want to send a log to syslog at :error level. applog 
<https://github.com/mojombo/god/blob/master/lib/god.rb#L104> is a method 
defined in God module.

    w.transition(:up, :start) do |on|
      applog(w, :error, "critical server process exited")
      on.condition(:process_exits) do |c|
        c.notify = 'alerts'
      end
    end

Currently, I see message in syslog when the watch config is loaded. How 
else can I log an error in syslog on a certain transition?

-- 
You received this message because you are subscribed to the Google Groups 
"god.rb" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/god-rb.
For more options, visit https://groups.google.com/d/optout.

Reply via email to