diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ab9ced..653e7dc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Release Notes for `logstash-input-cloudwatch_logs` +## Unreleased + +### Fixed +* Fixed bad merge on [#eb38dfd](https://github.com/lukewaite/logstash-input-cloudwatch-logs/commit/eb38dfdc072b4fd21e9c1d83ea306e2b6c5df37b) and restore compatibility with the Logstash 5.x events API + ## v0.10.1 (2017-04-19) ### Fixed diff --git a/lib/logstash/inputs/cloudwatch_logs.rb b/lib/logstash/inputs/cloudwatch_logs.rb index 98e9303..cfd264f 100644 --- a/lib/logstash/inputs/cloudwatch_logs.rb +++ b/lib/logstash/inputs/cloudwatch_logs.rb @@ -124,9 +124,9 @@ def process_log(queue, log, stream) @codec.decode(log.message.to_str) do |event| event.set("@timestamp", parse_time(log.timestamp)) - event["[cloudwatch][ingestion_time]"] = parse_time(log.ingestion_time) - event["[cloudwatch][log_group]"] = stream.arn.split(/:/)[6] - event["[cloudwatch][log_stream]"] = stream.log_stream_name + event.set("[cloudwatch][ingestion_time]", parse_time(log.ingestion_time)) + event.set("[cloudwatch][log_group]", stream.arn.split(/:/)[6]) + event.set("[cloudwatch][log_stream]", stream.log_stream_name) decorate(event) queue << event