Class: LogStash::Codecs::CloudWatchLogSubscription
- Inherits:
-
Spool
- Object
- Spool
- LogStash::Codecs::CloudWatchLogSubscription
- Defined in:
- lib/logstash/codecs/cloudwatchlogsubscription.rb
Instance Method Summary collapse
Instance Method Details
#decode(data) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/logstash/codecs/cloudwatchlogsubscription.rb', line 11 def decode(data) data = LogStash::Json.load(data.force_encoding("UTF-8")) super(data['logEvents']) do |event| event['cloudwatch-logs'] = { :owner => data['owner'], :logGroup => data['logGroup'], :logStream => data['logStream'] } yield LogStash::Event.new(event) end end |