serilog/serilog — pull request #288 by Mpdreamz (2014-11-16 11:40:27+00:00)
Title: Elasticsearch sink improvements

This PR brings the default behaviour of the elasticsearch sink in sync with serilog's conservative choice to favor ToString() unknown objects over desctructering them (such as exceptions).

* Sink now uses a subclass of `JsonFormatter`, instead of forcing the data into our own local LogEvent and relying on `ElasticSearchPropertyFormatter` to flatten serilogs data structures. We now hook into serilogs own serialization routine.
* Had to add some hooks so that the subclass could override property names.
* If you provide the elasticsearch sink with an IElasticsearchSerializer instead of ToString()-ing unknown objects the sink will serialize them as json objects allowing events to be filtered/aggregated more granular.
* This allows you to optionally take a dependency on `Elasticsearch.Net.JsonNET` and take advantage of the full power of JsonNET.
* Added unit tests for the elasticsearch sink.
* Added an .editorconfig file to force files to use an indentation of 4 spaces
* The events were always written to an index formatted DateTime.UtcNow, but the event timestamp should be leading what index the event has to go into.