private void Handle(CommandStartedEvent @event)
 {
     if (_traceSource.Switch.ShouldTrace(TraceEventType.Verbose))
     {
         Debug(TraceSourceEventHelper.CommandIdBase, "{0}-{1}: sending {2}.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.RequestId, @event.Command);
     }
     else
     {
         Info(TraceSourceEventHelper.CommandIdBase, "{0}-{1}: sending {2}.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.RequestId, @event.CommandName);
     }
 }
Example #2
0
 private void Handle(ConnectionPoolAddingConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 4, "{0}-pool: adding connection.", TraceSourceEventHelper.Label(@event.ServerId));
 }
Example #3
0
 private void Handle(ClusterDescriptionChangedEvent @event)
 {
     Info(TraceSourceEventHelper.ClusterIdBase + 8, "{0}: {1}", TraceSourceEventHelper.Label(@event.OldDescription.ClusterId), @event.NewDescription);
 }
Example #4
0
 private void Handle(ClusterRemovingServerEvent @event)
 {
     Debug(TraceSourceEventHelper.ClusterIdBase + 6, "{0}: removing server {1}. Reason: {2}", TraceSourceEventHelper.Label(@event.ServerId.ClusterId), TraceSourceEventHelper.Format(@event.ServerId), @event.Reason);
 }
Example #5
0
 private void Handle(ClusterAddingServerEvent @event)
 {
     Info(TraceSourceEventHelper.ClusterIdBase + 4, "{0}: adding server at endpoint {1}.", TraceSourceEventHelper.Label(@event.ClusterId), TraceSourceEventHelper.Format(@event.EndPoint));
 }
Example #6
0
 private void Handle(ClusterClosingEvent @event)
 {
     Debug(TraceSourceEventHelper.ClusterIdBase + 2, "{0}: closing.", TraceSourceEventHelper.Label(@event.ClusterId));
 }
Example #7
0
 private void Handle(ServerDescriptionChangedEvent @event)
 {
     Debug(TraceSourceEventHelper.ServerIdBase + 7, "{0}: {1}", TraceSourceEventHelper.Label(@event.OldDescription.ServerId), @event.NewDescription);
 }
Example #8
0
 private void Handle(ServerHeartbeatSucceededEvent @event)
 {
     Debug(TraceSourceEventHelper.ServerIdBase + 5, "{0}: sent heartbeat in {1}ms.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.Duration.TotalMilliseconds);
 }
Example #9
0
 private void Handle(ConnectionOpeningFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ConnectionIdBase + 2, @event.Exception, "{0}: unable to open.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #10
0
 // Connections
 private void Handle(ConnectionOpeningEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase, "{0}: opening.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #11
0
 private void Handle(ConnectionPoolCheckedInConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 12, "{0}-pool: checked in connection {1} in {2}ms.", TraceSourceEventHelper.Label(@event.ConnectionId.ServerId), TraceSourceEventHelper.Format(@event.ConnectionId), @event.Duration.TotalMilliseconds);
 }
Example #12
0
 private void Handle(ConnectionPoolCheckingInConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 11, "{0}-pool: checking in connection {1}.", TraceSourceEventHelper.Label(@event.ConnectionId.ServerId), TraceSourceEventHelper.Format(@event.ConnectionId));
 }
Example #13
0
 private void Handle(ConnectionPoolCheckingOutConnectionFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ConnectionPoolIdBase + 10, @event.Exception, "{0}-pool: error checking out a connection.", TraceSourceEventHelper.Label(@event.ServerId));
 }
Example #14
0
 private void Handle(ConnectionPoolCheckingOutConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 8, "{0}-pool: checking out a connection.", TraceSourceEventHelper.Label(@event.ServerId));
 }
Example #15
0
 private void Handle(ConnectionPoolRemovingConnectionEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionPoolIdBase + 6, "{0}-pool: removing connection {1}.", TraceSourceEventHelper.Label(@event.ConnectionId.ServerId), TraceSourceEventHelper.Format(@event.ConnectionId));
 }
Example #16
0
 private void Handle(ConnectionSendingMessagesFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ConnectionIdBase + 11, @event.Exception, "{0}: error sending messages [{1}].", TraceSourceEventHelper.Label(@event.ConnectionId), string.Join(",", @event.RequestIds));
 }
Example #17
0
 private void Handle(ServerHeartbeatStartedEvent @event)
 {
     Debug(TraceSourceEventHelper.ServerIdBase + 4, "{0}: sending heartbeat.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #18
0
 private void Handle(ConnectionClosedEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase + 4, "{0}: closed.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #19
0
 private void Handle(ServerHeartbeatFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ServerIdBase + 6, @event.Exception, "{0}: error sending heartbeat.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #20
0
 private void Handle(ConnectionFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ConnectionIdBase + 5, @event.Exception, "{0}: failed.", TraceSourceEventHelper.Label(@event.ConnectionId));
 }
Example #21
0
 private void Handle(ClusterOpenedEvent @event)
 {
     Debug(TraceSourceEventHelper.ClusterIdBase + 1, "{0}: opened in {1}ms.", TraceSourceEventHelper.Label(@event.ClusterId), @event.Duration.TotalMilliseconds);
 }
Example #22
0
 private void Handle(ConnectionReceivingMessageEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase + 6, "{0}: receiving message in response to {1}.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.ResponseTo);
 }
Example #23
0
 private void Handle(ClusterClosedEvent @event)
 {
     Info(TraceSourceEventHelper.ClusterIdBase + 3, "{0}: closed in {1}ms.", TraceSourceEventHelper.Label(@event.ClusterId), @event.Duration.TotalMilliseconds);
 }
Example #24
0
 private void Handle(ConnectionReceivedMessageEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase + 7, "{0}: received message in response to {1} of length {2} bytes in {3}ms.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.ResponseTo, @event.Length, @event.Duration.TotalMilliseconds);
 }
Example #25
0
 private void Handle(ClusterAddedServerEvent @event)
 {
     Debug(TraceSourceEventHelper.ClusterIdBase + 5, "{0}: added server {1} in {2}ms.", TraceSourceEventHelper.Label(@event.ServerId.ClusterId), TraceSourceEventHelper.Format(@event.ServerId), @event.Duration.TotalMilliseconds);
 }
Example #26
0
 private void Handle(ConnectionReceivingMessageFailedEvent @event)
 {
     Error(TraceSourceEventHelper.ConnectionIdBase + 8, @event.Exception, "{0}: error receiving message in response to {1}.", TraceSourceEventHelper.Label(@event.ConnectionId), @event.ResponseTo);
 }
Example #27
0
 private void Handle(ClusterRemovedServerEvent @event)
 {
     Info(TraceSourceEventHelper.ClusterIdBase + 7, "{0}: removed server {1} in {2}ms. Reason: {3}", TraceSourceEventHelper.Label(@event.ServerId.ClusterId), TraceSourceEventHelper.Format(@event.ServerId), @event.Duration.TotalMilliseconds, @event.Reason);
 }
Example #28
0
 private void Handle(ConnectionSendingMessagesEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase + 9, "{0}: sending messages [{1}].", TraceSourceEventHelper.Label(@event.ConnectionId), string.Join(",", @event.RequestIds));
 }
Example #29
0
 // Servers
 private void Handle(ServerOpeningEvent @event)
 {
     Info(TraceSourceEventHelper.ServerIdBase, "{0}: opening.", TraceSourceEventHelper.Label(@event.ServerId));
 }
Example #30
0
 private void Handle(ConnectionSentMessagesEvent @event)
 {
     Debug(TraceSourceEventHelper.ConnectionIdBase + 10, "{0}: sent messages [{1}] of length {2} bytes in {3}ms.", TraceSourceEventHelper.Label(@event.ConnectionId), string.Join(",", @event.RequestIds), @event.Length, @event.Duration.TotalMilliseconds);
 }