Skip to content
This repository has been archived by the owner on Jul 19, 2023. It is now read-only.

Commit

Permalink
fix: restore compatibility with the new logstash 5.x events api (#21)
Browse files Browse the repository at this point in the history
Closes #20
  • Loading branch information
lukewaite authored Apr 21, 2017
1 parent 7ebc26c commit b5ef169
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 3 additions & 3 deletions lib/logstash/inputs/cloudwatch_logs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5ef169

Please sign in to comment.