Skip to content

Commit

Permalink
server: better logs
Browse files Browse the repository at this point in the history
  • Loading branch information
travisjeffery committed Sep 3, 2017
1 parent a2fd23a commit e7c94f6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (s *Server) handleRequest(conn net.Conn) {

d := protocol.NewDecoder(b)
header.Decode(d)
s.logger.Debug("correlation id [%d], request size [%d], key [%d]", header.CorrelationID, size, header.APIKey)
s.logger.Debug("request: correlation id [%d], client id [%s], request size [%d], key [%d]", header.CorrelationID, header.ClientID, size, header.APIKey)

switch header.APIKey {
case protocol.APIVersionsKey:
Expand Down Expand Up @@ -401,6 +401,7 @@ func (s *Server) handleMetadata(conn net.Conn, header *protocol.RequestHeader, r
}

func (s *Server) write(conn net.Conn, header *protocol.RequestHeader, e protocol.Encoder) error {
s.logger.Debug("response: correlation id [%d], key [%d]", header.CorrelationID, header.APIKey)
b, err := protocol.Encode(e)
if err != nil {
return err
Expand Down

0 comments on commit e7c94f6

Please sign in to comment.