commit 9524fdf7a6b9a4e66e8a28003bd32f072debb431
Author: Brian Curtin <email address hidden>
Date: Fri Aug 14 11:50:24 2015 -0500
Only log text strings in requests
As was exposed by object_store.create_object, we were attempting to mix
text and bytes in log messages, which was causing _logger.debug to choke
when combining the parts of the message, specifically the --data piece.
This is an issue for two reasons:
1. It's binary data in general
2. It's a very large amount of binary data
The fix is to not log byte strings that come in as `data` unless we can
decode them to ascii. This will allow us to continue logging some data
such as auth credentials, but we won't be logging megabytes or gigabytes
worth of binary data - such as objects being uploaded to Swift - into
the log file.
Reviewed: https:/ /review. openstack. org/213247 /git.openstack. org/cgit/ stackforge/ python- openstacksdk/ commit/ ?id=9524fdf7a6b 9a4e66e8a28003b d32f072debb431
Committed: https:/
Submitter: Jenkins
Branch: master
commit 9524fdf7a6b9a4e 66e8a28003bd32f 072debb431
Author: Brian Curtin <email address hidden>
Date: Fri Aug 14 11:50:24 2015 -0500
Only log text strings in requests
As was exposed by object_ store.create_ object, we were attempting to mix
text and bytes in log messages, which was causing _logger.debug to choke
when combining the parts of the message, specifically the --data piece.
This is an issue for two reasons:
1. It's binary data in general
2. It's a very large amount of binary data
The fix is to not log byte strings that come in as `data` unless we can
decode them to ascii. This will allow us to continue logging some data
such as auth credentials, but we won't be logging megabytes or gigabytes
worth of binary data - such as objects being uploaded to Swift - into
the log file.
Change-Id: Iba49552b8ebc58 a46cedf82675119 3a1fa7feb11
Partial-Bug: 1485054