hapyrus/fluent-plugin-redshift — pull request #5 by adorechic (2013-06-27 09:13:03+00:00)
Title: Add file_type 'hash'

## Overview
This commit add file type 'hash' to receive Hash log format.

## Examples

```ruby
# examples by fluent-logger
require 'fluent-logger'
log = Fluent::Logger::FluentLogger.new(nil, :host => 'localhost', :port => 24224)

# file_type: tsv
log.post('your.tag', :log => "12345\t12345")

# file_type: json
require 'json'
log.post('your.tag', :log => { :user_id => 12345, :data_id => 12345 }.to_json)

# [new] file_type: hash
log.post('your.tag', :user_id => 12345, :data_id => 12345)
```

## Background
Current file types require us to convert logs as csv, tsv, json strings previous enqueue fluentd.
But fluent plugins can get Hash object directly through msgpack.
Especially in ruby, a cost to convert JSON is higher than msgpack converting.

In cases such as logging from ruby applications using fluent-logger, it is more useful to post as Hash object.