예제 #1
0
		internal static void LogNodeInMessageException(SerializedRelayMessage[] messages, Node node, Exception ex)
		{
			if (_log.IsErrorEnabled)
			{
				if (ex is SocketException)
				{
					SocketException sex = (SocketException)ex;
					_log.ErrorFormat("Socket error {0} while handling {1} IN messages for node {2}", sex.SocketErrorCode, messages.Length, node.ToExtendedString());
				}
				else
				{
					_log.ErrorFormat("Error handling {0} IN messages for node {1}: {2}.", messages.Length, node.ToExtendedString(), ex);
				}
			}
		}
예제 #2
0
		internal static void LogNodeOutMessageException(List<RelayMessage> messages, Node node, Exception ex)
		{
			if (_log.IsErrorEnabled)
			{
				if (ex is SocketException)
				{
					SocketException sex = (SocketException)ex;
					_log.ErrorFormat("Socket error {0} while handling {1} OUT messages for node {2}", sex.SocketErrorCode, messages.Count, node.ToExtendedString());
				}
				else
				{
					_log.ErrorFormat("Error handling {0} OUT messages for node {1}: {2}", messages.Count, node.ToExtendedString(), ex.ToString());
				}
			}
		}