Skip to content

Commit

Permalink
Make log messages less duplicative.
Browse files Browse the repository at this point in the history
  • Loading branch information
creachadair committed Aug 17, 2021
1 parent 251ec81 commit d82fb9b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (s *Server) serve() {
for {
next, err := s.nextRequest()
if err != nil {
s.log("Reading next request: %v", err)
s.log("Error reading from client: %v", err)
return
}
s.wg.Add(1)
Expand Down Expand Up @@ -172,7 +172,7 @@ func (s *Server) nextRequest() (func() error, error) {
ch := s.ch // capture

next := s.inq.Remove(s.inq.Front()).(jmessages)
s.log("Processing %d requests", len(next))
s.log("Dequeued request batch of length %d", len(next))

// Construct a dispatcher to run the handlers outside the lock.
return s.dispatch(next, ch), nil
Expand Down Expand Up @@ -587,7 +587,7 @@ func (s *Server) read(ch channel.Receiver) {
} else if len(in) == 0 {
s.pushError(Errorf(code.InvalidRequest, "empty request batch"))
} else {
s.log("Received %d new requests", len(in))
s.log("Received request batch of size %d", len(in))
s.inq.PushBack(in)
s.work.Broadcast()
}
Expand Down

0 comments on commit d82fb9b

Please sign in to comment.