Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lib/cwlogs-s3/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,13 @@ def execute
log_group_name: command_options[:group],
)

start_ms = start.to_i * 1000
end_ms = ending.to_i * 1000

resp.each do |streams|
streams[:log_streams].each do |stream|
next if stream[:last_event_timestamp] < start_ms
next if end_ms < stream[:first_event_timestamp]
@stream_list.push stream[:log_stream_name]
end
end
Expand All @@ -48,8 +53,8 @@ def execute
resp = @cwl.get_log_events(
log_group_name: command_options[:group],
log_stream_name: stream,
start_time: start.to_i * 1000,
end_time: ending.to_i * 1000,
start_time: start_ms,
end_time: end_ms,
start_from_head: true
)

Expand Down