Skip to content

Commit

Permalink
Make response bodies log at error level when an HTTP error occurs.
Browse files Browse the repository at this point in the history
  • Loading branch information
tknarr committed Jun 20, 2016
1 parent 861fc5a commit 00a240d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dnsapi_freedns.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,6 @@ def update( dnsapi_data, dnsapi_domain_data, key_data, debugging = False ):
else:
result = False
logging.error( "DNS API freedns: HTTP error %d", resp.status_code )
logging.debug( "DNS API freedns: error response body:\n%s", resp.text )
logging.error( "DNS API freedns: error response body:\n%s", resp.text )

return result
2 changes: 1 addition & 1 deletion dnsapi_linode.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ def update( dnsapi_data, dnsapi_domain_data, key_data, debugging = False ):
else:
result = False
logging.error( "DNS API linode: HTTP error %d", resp.status_code )
logging.debug( "DNS API linode: error response body:\n%s", resp.text )
logging.error( "DNS API linode: error response body:\n%s", resp.text )

return result

0 comments on commit 00a240d

Please sign in to comment.