Only json parse message if this is a json logstash event
Add directory detector
Remove setLogLevel in directory detector
Add some debug in directory detector
Code format
Add test with mkdir -p for directory_detector
Use directory detector on input_file
Support JSON-formatted messages using json_fields filter.

The json_fields plugin will try to parse the message payload as a JSON
object, starting from the first `{` character found in the message.

If successful, the parsed data is merged to the `@fields` attribute,
eventually overwritting existing conflicting-attributes, but keeping
any non-conflicting attribute.

This allows to automatically index the message payload in elasticsearch,
without having to maitain patterns, as long as the logging application
speaks JSON.
Merge pull request #30 from prologism/json_fields

Support JSON-formatted messages using json_fields filter.