17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
# File 'lib/awsutils/awslogs.rb', line 17
def run
print_events
rescue TooManyEventsError
puts "Too many log events to process (MAX: #{MAX_EVENTS}). " \
'Please try filtering the output with -f'
exit 3
rescue TooManyStreamsError
puts "Too many streams to process (MAX: #{MAX_STREAMS}). " \
'Please try filtering the output with -s'
exit 3
rescue LogGroupNotFoundError
puts "No log groups found starting with #{opts[:group]}"
exit 1
rescue NoStreamsError
puts 'Streams filter did not return any streams'
exit 1
rescue MultipleGroupsError => e
puts e.message
exit 2
end
|