1
0
Fork 0

Logger and Leaks

This commit is contained in:
Ludovic Fernandez 2018-02-12 17:24:03 +01:00 committed by Traefiker Bot
parent 91fa727c74
commit 38a4c80995
11 changed files with 108 additions and 82 deletions

View file

@ -126,7 +126,7 @@ func (c *CircuitBreaker) activateFallback(w http.ResponseWriter, req *http.Reque
c.m.Lock()
defer c.m.Unlock()
log.Infof("%v is in error state", c)
log.Warnf("%v is in error state", c)
switch c.state {
case stateStandby:
@ -197,7 +197,7 @@ func (c *CircuitBreaker) exec(s SideEffect) {
}
func (c *CircuitBreaker) setState(new cbState, until time.Time) {
log.Infof("%v setting state to %v, until %v", c, new, until)
log.Debugf("%v setting state to %v, until %v", c, new, until)
c.state = new
c.until = until
switch new {
@ -230,7 +230,7 @@ func (c *CircuitBreaker) checkAndSet() {
c.lastCheck = c.clock.UtcNow().Add(c.checkPeriod)
if c.state == stateTripped {
log.Infof("%v skip set tripped", c)
log.Debugf("%v skip set tripped", c)
return
}