Module: ContainerShip::Command::Modules::Cloudwatch
- Included in:
- ExecCommand
- Defined in:
- lib/container_ship/command/modules/cloudwatch.rb
Instance Method Summary collapse
Instance Method Details
#show_log(task_definition, task_arn) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/container_ship/command/modules/cloudwatch.rb', line 9 def show_log(task_definition, task_arn) return if task_definition.log_group_name.nil? || task_definition.log_stream_name(task_arn).nil? Aws::CloudWatchLogs::Client.new.get_log_events( log_group_name: task_definition.log_group_name, log_stream_name: task_definition.log_stream_name(task_arn) ).events.map(&:message).each(&method(:puts)) end |