title: Debugging ## Debugging ## Libcloud has a special debug mode which when enabled outputs all the outgoing HTTP requests and all the incoming HTTP responses. Output also includes cURL commands which can be used to re-produce the requests. When this mode is enabled and if `paramiko` library is installed (used for deployment), paramiko library log level is also set to `DEBUG` which helps with debugging the deployment issues. To enable it, set `LIBCLOUD_DEBUG` environment variable and make it point to a file where the output should be saved. For example if you want the output to be logged to the standard error (on Unix) you can set it to `/dev/stderr` - `LIBCLOUD_DEBUG=/dev/stderr python my_script.py`. Example output: # -------- begin 4431824872 request ---------- curl -i -X GET -H 'Host: s3.amazonaws.com' -H 'X-LC-Request-ID: 4431824872' -H 'Content-Length: 0' -H 'User-Agent: libcloud/0.6.0-beta1 (Amazon S3 (standard))' 'https://s3.amazonaws.com:443/?AWSAccessKeyId=foo&Signature=bar' # -------- begin 4431824872:4431825232 response ---------- HTTP/1.1 200 OK X-Amz-Id-2: 1234 Server: AmazonS3 Transfer-Encoding: chunked X-Amz-Request-Id: FFFFFFFFFF Date: Tue, 01 Nov 2011 22:29:11 GMT Content-Type: application/xml 171 sada8932dsa8d30ikamitest343243232011-11-01T22:17:23.000Z 0 # -------- end 4431824872:4431825232 response ----------