Skip to content

Commit

Permalink
Update ElasticSearchReport.cs
Browse files Browse the repository at this point in the history
Check that you have \n after each line (last line needs it as well).
  • Loading branch information
robertaves committed Jun 17, 2015
1 parent 8c06e2b commit 050d10e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Src/Metrics/ElasticSearch/ElasticSearchReport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private class ESDocument
public string ToJsonString()
{
var meta = string.Format("{{ \"index\" : {{ \"_index\" : \"{0}\", \"_type\" : \"{1}\"}} }}", this.Index, this.Type);
return meta + Environment.NewLine + this.Object.AsJson(false);
return meta + Environment.NewLine + this.Object.AsJson(false) + Environment.NewLine;
}
}

Expand All @@ -46,7 +46,7 @@ protected override void EndReport(string contextName)
base.EndReport(contextName);
using (var client = new WebClient())
{
var json = string.Join(Environment.NewLine, this.data.Select(d => d.ToJsonString()));
var json = string.Join(string.Empty, this.data.Select(d => d.ToJsonString()));
client.UploadString(this.elasticSearchUri, json);
}
}
Expand Down

0 comments on commit 050d10e

Please sign in to comment.