From 421a58c553e696739e2ea8bff5d193abdbbd290b Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Thu, 20 Feb 2014 18:53:31 +0000 Subject: [PATCH] log state changes --- masterelection/masterelection.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/masterelection/masterelection.go b/masterelection/masterelection.go index deada56e..231be050 100644 --- a/masterelection/masterelection.go +++ b/masterelection/masterelection.go @@ -179,10 +179,12 @@ func (m *MasterElection) Run() { if err == nil { // Howdy, we're the master now. Wait a while // and renew our TTL. + log.Printf("masterelection: we are the master") m.runMaster(response.EtcdIndex) } else { // We're not the master. Wait until the lock // is deleted or expires. + log.Printf("masterelection: running as slave (%s)", err) m.runSlave(watchIndex) } } -- GitLab