Skip to content

Commit 96b6cca

Browse files
committed
Tidy up log messages
1 parent 50a66ec commit 96b6cca

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

ckanext/datapusher_plus/jobs.py

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -224,8 +224,6 @@ def _push_to_datastore(
224224
api_token = utils.get_dp_plus_user_apitoken()
225225
headers["Authorization"] = api_token
226226

227-
logger.debug("DEBUG: A: "+repr(headers)) # DEBUG
228-
229227
# If the ckan_url differs from this url, rewrite this url to the ckan
230228
# url. This can be useful if ckan is behind a firewall.
231229
if not resource_url.startswith(ckan_url):
@@ -250,16 +248,15 @@ def _push_to_datastore(
250248
"https": conf.DOWNLOAD_PROXY,
251249
}
252250

253-
logger.debug("DEBUG: B: "+repr(resource_url)) # DEBUG
254-
logger.debug("DEBUG: B: "+repr( kwargs)) # DEBUG
255-
256-
251+
logger.debug("datpusher-plus resource download request:")
252+
logger.debug(" {resource_url=")
253+
for tkey in kwargs:
254+
logger.debug(f" {tkey}: {kwargs[tkey]}")
257255

258256
with requests.get(resource_url, **kwargs) as response:
257+
logger.debug("datpusher-plus resource download response:")
258+
logger.debug(f" {response!r}")
259259
response.raise_for_status()
260-
logger.debug("DEBUG: C: "+repr(response)) # DEBUG
261-
262-
263260
cl = response.headers.get("content-length")
264261
max_content_length = conf.MAX_CONTENT_LENGTH
265262
ct = response.headers.get("content-type")

0 commit comments

Comments
 (0)