logstash/logstash-logback-encoder — pull request #36 by galet (2014-06-06 15:57:42+00:00)
Title: Enhancement: Add support for custom context maps so that JSON fields can be passed directly from log calls

We found the JSON marker not ideal for our use cases where you would like to pass ad-hoc entries (e.g. metrics) directly as a field to the JSON object.

This proposal makes it possible by looking at the last argument in the argument list. If the argument is a `Map` then it will be added to the JSON.

Example:
```java
log.info("Service started in {} seconds", duration/1000, Collections.singletonMap("duration", duration));
```

Will produce:
```json
{
"@timestamp": "2014-06-04T15:26:14.464+02:00",
"@version": 1,
"message": "Service started in 12 seconds",
"logger_name": "com.acme.Tester",
"thread_name": "main",
"level": "INFO",
"level_value": 20000,
"duration": 12368,
"tags": []
}
```

The good thing is that the placeholders in the message can have a human readable version of the data, whereas the "raw" context entries are good for processing.

This feature is disabled by default and needs to be enabled:
```xml

true

```