basho / riak-nodejs-client

The Riak client for Node.js.
Apache License 2.0
72 stars 29 forks source link

Logging improvements [JIRA: CLIENTS-786] #138

Open mogadanez opened 8 years ago

mogadanez commented 8 years ago

current log snippet:

February 29th 2016, 19:01:55.428    debug   [RiakNode] (10.0.1.1:8087:12) executed
February 29th 2016, 19:01:55.420    error   [RiakConnection] (10.0.1.1:8087) { [Error: This socket has been ended by the other party] code: 'EPIPE' }
February 29th 2016, 19:01:55.420    debug   [RiakNode] (10.0.1.1:8087:2) executed
February 29th 2016, 19:01:55.419    error   [RiakConnection] (10.0.1.1:8087) { [Error: This socket has been ended by the other party] code: 'EPIPE' }
February 29th 2016, 19:01:55.417    debug   [RoundRobinNodeManager] executing command 'RpbGetReq' on node (10.0.1.1:8087)
February 29th 2016, 19:01:55.417    debug   [RiakNode] executing command 'RpbGetReq' on node (10.0.1.1:8087:1) (existing connection)
February 29th 2016, 19:01:55.417    debug   [RiakNode] executing command 'RpbGetReq' on node (10.0.1.1:8087:1) (available: 10)
February 29th 2016, 19:01:55.416    debug   [RiakNode] node (10.0.1.1:8087:11) command RpbGetReq complete
February 29th 2016, 19:01:55.416    debug   [RiakNode] node (10.0.1.1:8087:12) command 'RpbGetReq' received code: 10
February 29th 2016, 19:01:55.416    debug   [RiakNode] node (10.0.1.1:8087) _available: 1, _currentNum: 1
February 29th 2016, 19:01:55.415    debug   [RiakNode] (10.0.1.1:8087:12) executed
February 29th 2016, 19:01:55.414    debug   [RoundRobinNodeManager] executing command 'RpbGetReq' on node (10.0.1.1:8087)
February 29th 2016, 19:01:55.414    debug   [RiakNode] executing command 'RpbGetReq' on node (10.0.1.1:8087:11) (available: 1)
February 29th 2016, 19:01:55.414    debug   [RiakNode] executing command 'RpbGetReq' on node (10.0.1.1:8087:11) (existing connection)
  1. Hard to understand which request is failed with EPIPE
  2. RpbGetReq has no any context logged, bucket, bucketType, key
  3. Ideally it should be unique identifier for Command which should be logged for all records including error messages.
lukebakken commented 8 years ago

139 implements a per-request identifier.