<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Net;

namespace Nest
{
	public class ConnectionStatus
	{
		public bool Success { get; private set; }
		public ConnectionError Error { get; private set; }
    public string RequestMethod { get; internal set; }
    public string RequestUrl { get; internal set; }
    public string Result { get; internal set; }
		public string Request { get; internal set; }

		public ConnectionStatus(Exception e)
		{
			this.Success = false;
			this.Error = new ConnectionError(e);
			this.Result = this.Error.Response;
		} 

		public ConnectionStatus(ConnectionError error)
		{
			this.Success = false;
			if (error != null)
			{ 
				this.Error = error;
				this.Result = this.Error.Response;
			}
		}
		public ConnectionStatus(string result)
		{
			this.Success = true;
			this.Result = result;
		}

	}
}<commit_msg>ConnectionStatus ToString now prints all the useful debug bits<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.IO;
using System.Net;

namespace Nest
{
	public class ConnectionStatus
	{
		public bool Success { get; private set; }
		public ConnectionError Error { get; private set; }
    public string RequestMethod { get; internal set; }
    public string RequestUrl { get; internal set; }
    public string Result { get; internal set; }
		public string Request { get; internal set; }

		public ConnectionStatus(Exception e)
		{
			this.Success = false;
			this.Error = new ConnectionError(e);
			this.Result = this.Error.Response;
		} 

		public ConnectionStatus(ConnectionError error)
		{
			this.Success = false;
			if (error != null)
			{ 
				this.Error = error;
				this.Result = this.Error.Response;
			}
		}
		public ConnectionStatus(string result)
		{
			this.Success = true;
			this.Result = result;
		}
    public override string ToString()
    {
      var r = this;
      var e = r.Error;
      var printFormat = "StatusCode: {1}, {0}\tMethod: {2}, {0}\tUrl: {3}, {0}\tRequest: {4}, {0}\tResponse: {5}";
      var print = printFormat.F( 
        Environment.NewLine,
        e.HttpStatusCode, 
        r.RequestMethod, 
        r.RequestUrl,
        r.Request,
        r.Result
      );
      if (!this.Success)
      {
        var errorFormat = "{0}\tExceptionMessage: {1}{0}\t StackTrace: {2}";
        print += errorFormat.F(Environment.NewLine, e.ExceptionMessage, e.OriginalException.StackTrace);
      }
      return print;
    }

	}
}
{'fraction_non_alphanumeric': 0.10848877046060144, 'fraction_numerical': 0.0049486105824134, 'mean_word_length': 3.043076923076923, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4618472', 'n_tokens_mistral': 872, 'n_tokens_neox': 789, 'n_words': 221}