Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

1. General Info > Enabling Debug Output with boto

Enabling Debug Output with boto

Occasionally, things don’t work exactly as you expected. When you are interacting with remote services via HTTP-based APIs, the best debugging tool you can have is detailed logs of the actual HTTP requests and responses sent to and received from the remote services.

boto provides a way to get very detailed logging by using the Python logging module. Full details of the capabilities of the Python logging module can be found at http://docs.python.org/library/logging.html, but this example shows a quick way to get full debug output printed to your interactive console when using boto:

% python
>>> import boto
>>> boto.set_stream_logger('paws')
>>> ec2 = boto.connect_ec2(debug=2)
>>> s3 = boto.connect_s3(debug=2)
>>>

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint