Skip to content

Commit

Permalink
Merge pull request #20 from litl/jbardin-backend
Browse files Browse the repository at this point in the history
Improve logging
  • Loading branch information
James Bardin committed Apr 9, 2015
2 parents c9c767c + 0e7a3f7 commit f2398ad
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions service.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"fmt"
"net"
"net/http"
"strings"
"sync"
"sync/atomic"
"time"
Expand Down Expand Up @@ -285,8 +284,7 @@ func (s *Service) add(backend *Backend) {
s.Lock()
defer s.Unlock()

log.Printf("Adding %s backend %s for %s at %s", strings.ToUpper(backend.Network),
backend.Addr, s.Name, s.Addr)
log.Printf("Adding %s backend %s{%s} for %s at %s", backend.Network, backend.Name, backend.Addr, s.Name, s.Addr)
backend.up = true
backend.rwTimeout = s.ServerTimeout
backend.dialTimeout = s.DialTimeout
Expand Down Expand Up @@ -319,7 +317,7 @@ func (s *Service) remove(name string) bool {

for i, b := range s.Backends {
if b.Name == name {
log.Printf("Removing %s backend %s for %s at %s", b.Network, b.Addr, s.Name, s.Addr)
log.Printf("Removing %s backend %s{%s} for %s at %s", b.Network, b.Name, b.Addr, s.Name, s.Addr)
last := len(s.Backends) - 1
deleted := b
s.Backends[i], s.Backends[last] = s.Backends[last], nil
Expand Down

0 comments on commit f2398ad

Please sign in to comment.