Class: LogStash::Event
- Inherits:
-
Object
- Object
- LogStash::Event
- Defined in:
- lib/logstash/outputs/fluentd.rb
Instance Method Summary collapse
Instance Method Details
#to_msgpack(packer = nil) ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'lib/logstash/outputs/fluentd.rb', line 13 def to_msgpack(packer=nil) # LogStash objects (ex: LogStash::Timestamp) are impossible to serialize by msgpack begin @data.reject{|a,b| a == TIMESTAMP }.to_msgpack rescue ArgumentError, NoMethodError LogStash::Json.load(@data.to_json).to_msgpack end end |