Logger and Leaks
This commit is contained in:
parent
91fa727c74
commit
38a4c80995
11 changed files with 108 additions and 82 deletions
6
vendor/github.com/vulcand/oxy/cbreaker/cbreaker.go
generated
vendored
6
vendor/github.com/vulcand/oxy/cbreaker/cbreaker.go
generated
vendored
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue