Skip to content

Instantly share code, notes, and snippets.

@trevorrowe
Created April 6, 2015 16:52
Show Gist options
  • Select an option

  • Save trevorrowe/c307eb86f59a22fd32ff to your computer and use it in GitHub Desktop.

Select an option

Save trevorrowe/c307eb86f59a22fd32ff to your computer and use it in GitHub Desktop.

Revisions

  1. trevorrowe created this gist Apr 6, 2015.
    8 changes: 8 additions & 0 deletions gistfile1.rb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,8 @@
    pattern = "[aws] [:client_class] operation=:operation duration=:time retries=:retries error=:error_class\n"
    Aws.config[:log_formatter] = Seahorse::Client::Logging::Formatter.new(pattern)

    # success
    [aws] [Aws::S3::Client] operation=list_buckets duration=0.602057 retries=0 error=

    # error
    [aws] [Aws::S3::Client] operation=head_bucket duration=1.100552 retries=0 error=Aws::S3::Errors::Forbidden