Skip to content

Commit 91967af

Browse files
committed
payload log dumping was added per request from Steve from Sparkpost support,
during debugging of DKIM signature validation problem with some messages Case ID# 203488 Payload dumping can be disabled with usual python logging configuration
1 parent 083da7b commit 91967af

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

sparkpost/transmissions.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,12 @@
33
import json
44
import warnings
55
from email.utils import parseaddr
6+
import logging
67

78
from .base import Resource
89
from .exceptions import SparkPostException
910

11+
log = logging.getLogger(__name__)
1012

1113
try:
1214
string_types = basestring
@@ -251,7 +253,13 @@ def send(self, **kwargs):
251253
"""
252254

253255
payload = self._translate_keys(**kwargs)
254-
results = self.request('POST', self.uri, data=json.dumps(payload))
256+
data = json.dumps(payload)
257+
# payload log dumping was added per request from Steve from Sparkpost support,
258+
# during debugging of DKIM signature validation problem with some messages
259+
# Case ID# 203488
260+
# Payload dumping can be disabled with usual python logging configuration
261+
logging.debug("Payload data: %s", data)
262+
results = self.request('POST', self.uri, data=data)
255263
return results
256264

257265
def _fetch_get(self, transmission_id):

0 commit comments

Comments
 (0)